Skip to content

Fix build on current ROS 2 (Rolling / Lyrical) - #99

Open
yishinli wants to merge 2 commits into
PickNikRobotics:rollingfrom
yishinli:fix/rolling-build
Open

yishinli wants to merge 2 commits into
PickNikRobotics:rollingfrom
yishinli:fix/rolling-build

Conversation

@yishinli

@yishinli yishinli commented Oct 26, 2026 •

Copy link
Copy Markdown

Summary

abb_ros2 no longer builds on current ROS 2 (Rolling / Lyrical):

 # abb_hardware_interface (same pattern in abb_rws_client and the abb_bringup test)
-ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS})
+target_link_libraries(${PROJECT_NAME} PUBLIC
+  abb_egm_rws_managers::abb_egm_rws_managers
+  hardware_interface::hardware_interface
+  pluginlib::pluginlib
+  rclcpp::rclcpp
+  rclcpp_lifecycle::rclcpp_lifecycle
+)
-CallbackReturn on_init(const hardware_interface::HardwareInfo& info) override;
+CallbackReturn on_init(const hardware_interface::HardwareComponentInterfaceParams& params) override;

abb_rws_client links abb_hardware_interface via abb_hardware_interface_LIBRARIES / _INCLUDE_DIRS, since that package only exports old-style variables.

Evidence

Before (ROS 2 Lyrical, Ubuntu 26.04):

CMake Error at CMakeLists.txt:18 (ament_target_dependencies):
  Unknown CMake command "ament_target_dependencies".

abb_hardware_interface.hpp:50:18: error: '... ABBSystemHardware::on_init(const hardware_interface::HardwareInfo&)'
  marked 'override', but does not override

After: the full workspace from abb.repos builds with colcon (together with ros-industrial/abb_libegm#172 and ros-industrial/abb_egm_rws_managers#16 for Boost 1.90). An IRB 4600 with use_fake_hardware:=true, joint_trajectory_controller and MoveIt 2 plans and executes OMPL and Pilz LIN trajectories.

The Build and Test workflow on rolling currently stops before building, in setup_rosdep (E: Unable to locate package ros-rolling-ros-environment), so CI on this PR will fail the same way until that is sorted out. Since abb.repos points abb_libegm and abb_egm_rws_managers at master, Rolling CI will also need ros-industrial/abb_libegm#172 and ros-industrial/abb_egm_rws_managers#16 to be merged.

Merge Danger

Door: two-way

Blast Radius: build-only

target_link_libraries with these targets works on all ROS 2 distros, and on_init(const HardwareComponentInterfaceParams&) is available in ros2_control since 4.34.0 (Jazzy) and 5.3.0 (Kilted), where the HardwareInfo overload is deprecated. Building this branch against an older ros2_control release would fail.

🤖 Generated with Claude Code

@mergify

mergify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@yishinli yishinli closed this Oct 26, 2026
yishinli and others added 2 commits October 26, 2026 12:56
ament_target_dependencies() was deprecated in Kilted
(ament/ament_cmake#572) and removed in Rolling / Lyrical
(ament/ament_cmake#614), so abb_hardware_interface, abb_rws_client and
the abb_bringup tests fail to configure with "Unknown CMake command".

Link the exported CMake targets directly instead. abb_hardware_interface
only exports old-style variables, so abb_rws_client uses
abb_hardware_interface_LIBRARIES / _INCLUDE_DIRS for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ros2_control replaced on_init(const HardwareInfo&) with
on_init(const HardwareComponentInterfaceParams&), so the override no
longer compiles. The body keeps using info_, which the base class
still populates from params.hardware_info.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yishinli yishinli reopened this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant