From 86f4c1be9026ff3017e0d7a951398a3ab8b6c4fe Mon Sep 17 00:00:00 2001 From: Nathan Brooks Date: Mon, 3 Aug 2026 01:29:03 -0600 Subject: [PATCH] Declare the hardware_interface dependency explicitly Both controllers include and name hardware_interface::LoanedCommandInterface directly, but neither declared hardware_interface in package.xml or found it in CMake. They relied on controller_interface to pull it in transitively: picknik_*_controller -> controller_interface -> hardware_interface That works today and is not a build break, but it means a dependency we use directly is invisible to rosdep and to anyone reading the manifest, and it would break silently if controller_interface ever stopped re-exporting it. Adds, for both packages: - hardware_interface in package.xml - find_package(hardware_interface REQUIRED) - hardware_interface in THIS_PACKAGE_INCLUDE_DEPENDS, so it is re-exported to consumers alongside the other direct deps - ${hardware_interface_TARGETS} in target_link_libraries, matching the ${..._TARGETS} style already used for controller_interface. That variable resolves to hardware_interface::hardware_interface only -- mock_components lives in a separate export set and is not pulled in. Reported by @Plumezz in #36 against the humble branch; the same gap is present on main and on humble, and both packages are affected, not just picknik_reset_fault_controller. Verified by building both packages from a clean workspace in a ros:lyrical-ros-base container: rosdep resolves the new dependency and colcon build succeeds. Fixes #36 Co-Authored-By: Claude Opus 5 (1M context) --- picknik_reset_fault_controller/CMakeLists.txt | 3 +++ picknik_reset_fault_controller/package.xml | 1 + picknik_twist_controller/CMakeLists.txt | 3 +++ picknik_twist_controller/package.xml | 1 + 4 files changed, 8 insertions(+) diff --git a/picknik_reset_fault_controller/CMakeLists.txt b/picknik_reset_fault_controller/CMakeLists.txt index d1399ca..5ae4cc9 100644 --- a/picknik_reset_fault_controller/CMakeLists.txt +++ b/picknik_reset_fault_controller/CMakeLists.txt @@ -9,6 +9,7 @@ endif() find_package(ament_cmake REQUIRED) find_package(ament_cmake_ros REQUIRED) find_package(controller_interface REQUIRED) +find_package(hardware_interface REQUIRED) find_package(geometry_msgs REQUIRED) find_package(example_interfaces REQUIRED) find_package(rclcpp REQUIRED) @@ -16,6 +17,7 @@ find_package(realtime_tools REQUIRED) set(THIS_PACKAGE_INCLUDE_DEPENDS controller_interface + hardware_interface geometry_msgs example_interfaces realtime_tools @@ -30,6 +32,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE target_link_libraries(${PROJECT_NAME} ${controller_interface_TARGETS} + ${hardware_interface_TARGETS} ${geometry_msgs_TARGETS} ${example_interfaces_TARGETS} realtime_tools::realtime_tools diff --git a/picknik_reset_fault_controller/package.xml b/picknik_reset_fault_controller/package.xml index 19002c2..594b43f 100644 --- a/picknik_reset_fault_controller/package.xml +++ b/picknik_reset_fault_controller/package.xml @@ -13,6 +13,7 @@ ament_cmake_ros controller_interface + hardware_interface geometry_msgs example_interfaces rclcpp diff --git a/picknik_twist_controller/CMakeLists.txt b/picknik_twist_controller/CMakeLists.txt index 5b0ab5b..8950a08 100644 --- a/picknik_twist_controller/CMakeLists.txt +++ b/picknik_twist_controller/CMakeLists.txt @@ -9,6 +9,7 @@ endif() find_package(ament_cmake REQUIRED) find_package(ament_cmake_ros REQUIRED) find_package(controller_interface REQUIRED) +find_package(hardware_interface REQUIRED) find_package(geometry_msgs REQUIRED) find_package(example_interfaces REQUIRED) find_package(rclcpp REQUIRED) @@ -16,6 +17,7 @@ find_package(realtime_tools REQUIRED) set(THIS_PACKAGE_INCLUDE_DEPENDS controller_interface + hardware_interface geometry_msgs example_interfaces realtime_tools @@ -30,6 +32,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE target_link_libraries(${PROJECT_NAME} ${controller_interface_TARGETS} + ${hardware_interface_TARGETS} ${geometry_msgs_TARGETS} ${example_interfaces_TARGETS} realtime_tools::realtime_tools diff --git a/picknik_twist_controller/package.xml b/picknik_twist_controller/package.xml index 46ae4b9..b23c71f 100644 --- a/picknik_twist_controller/package.xml +++ b/picknik_twist_controller/package.xml @@ -10,6 +10,7 @@ ament_cmake_ros controller_interface + hardware_interface geometry_msgs example_interfaces rclcpp