Skip to content

Support for chainable wrench / torque command controller #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: rolling
Choose a base branch
from

Conversation

mhubii
Copy link
Member

@mhubii mhubii commented Mar 31, 2025

Attempts to fix #115 / #250 by turning LBRWrenchCommandController into a ChainableControllerInterface. Also see https://control.ros.org/rolling/doc/ros2_control/controller_manager/doc/controller_chaining.html.

Same might be done for LBRTorqueCommandController while at it.

Some thoughts:

  • Requires documentation of Document load data calibration #235
    • Update fri Java app to include tools
    • Throw on FRI 2.x until supported in Java app
  • Consider using external force state interface for load data safety checking (i.e. expect 0 external force on initialization), see
    estimated_ft_sensor: # estimates the external force-torque from the external joint torque values

    This would also force users to enable the FT estimation as interfaces will not be available otherwise.
    • In compliant control modes, system inteface should check (true value is only available in COMMANDING_ACTIVE state, realistically can only check in CommandGuard / new StateGuard? for external torques as external forces computation would slow the interfaces. Maybe in on state switch to guarantee single check during initialization?)
    • In position control modes, compliant controller should check (add this to wrench / torque command controller and admittance controller)
  • Add configurable maximum wrenches (cartesian impedance) and joint torques (impedance)
  • Add a demo for use with MoveIt / just the joint trajectory controller. Notes:
  • Update topic names (by IDL names):
    • wrench -> lbr_wrench_command
    • torque -> lbr_torque_command
    • joint_position -> lbr_joint_position_command (for consitency)

@mhubii mhubii self-assigned this Mar 31, 2025
@mhubii mhubii added the enhancement New feature or request label Mar 31, 2025
@mhubii mhubii added this to the Controller updates milestone Mar 31, 2025
@mhubii mhubii changed the title Support for chainable wrench command controller Support for chainable wrench / torque command controller Mar 31, 2025
@mhubii mhubii requested a review from Copilot April 3, 2025 08:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds chainable controller support to the LBRWrenchCommandController, enabling the controller to operate in chained mode with updated state and command interface management.

  • Inherits from ChainableControllerInterface and updates the export functions for state and command interfaces.
  • Introduces new subscriptions for wrench command handling along with corresponding reset and initialization methods.
  • Updates pluginlib export to use the new chainable interface.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
lbr_ros2_control/src/controllers/lbr_wrench_command_controller.cpp Updates include new subscription logic, refined state and command interface exports, reset functions, and chainable mode handling.
lbr_ros2_control/include/lbr_ros2_control/controllers/lbr_wrench_command_controller.hpp Header modifications to reflect the chainable interface inheritance, new function prototypes, and additional include directives.
Files not reviewed (1)
  • lbr_ros2_control/plugin_description_files/controllers.xml: Language not supported
Comments suppressed due to low confidence (1)

lbr_ros2_control/src/controllers/lbr_wrench_command_controller.cpp:270

  • The implementation of reset functions appears to be inverted: 'reset_lbr_wrench_command_subscription_()' resets 'wrench_command_subscription_ptr_' instead of 'lbr_wrench_command_subscription_ptr_'. Consider swapping the implementations of reset_lbr_wrench_command_subscription_() and reset_wrench_command_subscription_() to ensure each resets the appropriate subscription.
void LBRWrenchCommandController::reset_lbr_wrench_command_subscription_() { if (wrench_command_subscription_ptr_) { wrench_command_subscription_ptr_.reset(); } }

@mhubii
Copy link
Member Author

mhubii commented Apr 5, 2025

For future reference: Command guards / state guards should be simple instances that are instantiated from a yaml configuration and stored as a map or similar. They should be iterated over and be called on, e.g. on enter commanding active, on command, on monitor, ...

It is however still not obvious how workspace monitoring could be implemented on this low level.

Also, it should be double checked whether this functionality is redundant with what is already available in ros2_control.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant