Upcoming breaking changes in ros2_control: deprecated Handle / export APIs removed

Quick heads-up for anyone maintaining hardware components or controllers on Rolling or Lyrical: ros2_control 6.12.0 removes the API that has been deprecated since Jazzy. It has been released into Lyrical and Rolling and will reach users with the next sync. We’ve patched most simulators and many public drivers already.

If your package currently builds with deprecation warnings from hardware_interface or controller_interface, it will very likely fail to build after the sync.

Jazzy and Kilted are not affected. The deprecated API remains there for backward compatibility.

Migration notes

We had migration notes for this available for some time but today I made some updates too on this PR, should it be still in flight when you are reading this.

What’s being removed

Affected packages are hardware_interface and controller_interface from this PR ros2_control#3610.

  1. Raw-pointer handles. You can no longer construct a StateInterface/CommandInterface from a double* that points into your own member variables. Handles now own their data, and you access it through shared pointers and the getter/setter API.
  2. Legacy hardware component exports. export_state_interfaces() and export_command_interfaces(), which return interfaces by value, are removed.
  3. Legacy chainable controller exports. The old by-value export methods on ChainableControllerInterface are removed in favour of the shared-pointer on_export_*_interfaces_list() callbacks.
1 Like