ros2_control: release_interfaces does not seem to work (or not work as expected)

Describe the bug

I have a controller which may decide to return return controller_interface::CallbackReturn::FAILURE; in case my hardware is in a state that is not usable in combination with the controller.

Prior to this I call release_interfaces but this does not seem to call a command_mode switch in the corresponding hardware interface in order to stop the interfaces.

In the corresponding header file controller_interface_base.hpp there is no available documentation for this method:

   CONTROLLER_INTERFACE_PUBLIC
  void release_interfaces();

To Reproduce

Return return controller_interface::CallbackReturn::FAILURE from on_activate. And call release_interfaces before.

Expected behavior

In general I would expect a controller that can not be successfully activated to release the claimed interfaces.

Environment (please complete the following information):

  • OS: Ubuntu 22.04
  • Version Iron binary install

About this issue

  • Original URL
  • State: closed
  • Created 3 months ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

Hi @saikishor as I really need to get my controller working this week I won’t be able to put any time into debugging this and will just work around this issue. 😦

I also wish you a great day!