ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

admittance_position not updating at runtime for admittance controller

Open nathandunk opened this issue 3 years ago • 3 comments

Describe the bug For the admittance controller, the admittance_state_.admittance_position is never updated. This doesn't affect the behavior of the controller, but would nice to be able to visualize for debugging (it currently incorrectly shows 0s and nans).

To Reproduce Steps to reproduce the behavior:

  1. Run an instance that includes an admittance controller and activate it
  2. run ros2 topic echo /admittance_controller/status --field admittance_position
  3. admittance position values show uninitialized values for position, and nans for rotation

Expected behavior admittance_position should be updated with the most recent position values. I believe the velocity and acceleration values are updated here and it would make sense to add that here as well.

Screenshots image

nathandunk avatar May 03 '23 23:05 nathandunk

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

github-actions[bot] avatar Apr 10 '25 12:04 github-actions[bot]

The field itself is populated https://github.com/ros-controls/ros2_controllers/blob/23b8ffc24bb74bf0f96679af73d5e9344b7d3809/admittance_controller/include/admittance_controller/admittance_rule_impl.hpp#L388 but the admittance_state_.admittance_position is never set

christophfroehlich avatar May 21 '25 13:05 christophfroehlich

Hi, I’d like to work on this issue.

I confirmed that current master still publishes admittance_state_.admittance_position, but the field is neither initialized nor updated during calculate_admittance_rule().

My proposed scope is:

  • Initialize the admittance-position transform to identity.
  • Update it from the relative translation and rotation already calculated during each admittance-rule update.
  • Add regression coverage to verify that the controller state publishes a valid, updated admittance-position transform.

I did not find an overlapping open pull request. Please let me know if there is a preferred convention for representing the relative transform in this state field.

dlanov avatar Aug 01 '26 01:08 dlanov