From abbf0bb7b74cc9386d6d6d513f55009b797234b6 Mon Sep 17 00:00:00 2001 From: John Morris Date: Tue, 21 Dec 2021 11:17:03 -0600 Subject: [PATCH] hal_hw_interface: Fix packaging issues --- hal_hw_interface/CMakeLists.txt | 27 ++++++++++++++-------- hal_hw_interface/package.xml | 5 ++-- hal_hw_interface/resource/hal_hw_interface | 0 3 files changed, 20 insertions(+), 12 deletions(-) delete mode 100644 hal_hw_interface/resource/hal_hw_interface diff --git a/hal_hw_interface/CMakeLists.txt b/hal_hw_interface/CMakeLists.txt index b363aef..3daa6a9 100644 --- a/hal_hw_interface/CMakeLists.txt +++ b/hal_hw_interface/CMakeLists.txt @@ -63,17 +63,16 @@ target_link_libraries(hal_control_node ${rclcpp_LIBRARIES}) ament_target_dependencies( hal_control_node + controller_manager hardware_interface - pluginlib rclcpp - rclcpp_lifecycle HAL ) # Build HAL system hardware plugin add_library( - hal_system_interface MODULE + hal_system_interface SHARED src/hal_system_interface.cpp ) @@ -100,9 +99,9 @@ pluginlib_export_plugin_description_file( # Install libraries install( - TARGETS hal_control_node + TARGETS hal_control_node hal_system_interface LIBRARY - DESTINATION lib/${PROJECT_NAME} + DESTINATION lib ) # Install C++ headers @@ -116,10 +115,6 @@ ament_export_include_directories( include ) -ament_export_libraries( - hal_control_node -) - ####################### # Python @@ -138,7 +133,7 @@ install(PROGRAMS # Install launch files install(DIRECTORY launch - DESTINATION share/${PROJECT_NAME}/launch) + DESTINATION share/${PROJECT_NAME}) # Install CMake files # FIXME: This belongs in Machinekit HAL! @@ -175,6 +170,18 @@ endif() ####################### # Finalize package +ament_export_include_directories( + include +) +ament_export_libraries( + hal_system_interface +) +ament_export_dependencies( + hardware_interface + pluginlib + rclcpp +) + ament_package( CONFIG_EXTRAS cmake/${PROJECT_NAME}-extras.cmake ) diff --git a/hal_hw_interface/package.xml b/hal_hw_interface/package.xml index be0224a..36d26ef 100644 --- a/hal_hw_interface/package.xml +++ b/hal_hw_interface/package.xml @@ -24,7 +24,6 @@ - machinekit-dev @@ -36,10 +35,10 @@ python-attrs-pip std_msgs std_srvs + hal_hw_interface_msgs rosidl_default_runtime machinekit - hal_hw_interface_msgs ament_cmake_cppcheck ament_cmake_cpplint @@ -55,10 +54,12 @@ controller_manager) https://github.com/ros/pluginlib/pull/222 --> libboost-thread + libboost-thread-dev rosidl_interface_packages + ament_cmake diff --git a/hal_hw_interface/resource/hal_hw_interface b/hal_hw_interface/resource/hal_hw_interface deleted file mode 100644 index e69de29..0000000