Skip to content
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

Problem integrating trajectory controller and chainable interface #735

Closed
pac48 opened this issue Jun 17, 2022 · 2 comments
Closed

Problem integrating trajectory controller and chainable interface #735

pac48 opened this issue Jun 17, 2022 · 2 comments

Comments

@pac48
Copy link
Contributor

pac48 commented Jun 17, 2022

I have a controller which I would like to use in chained mode. I want it to accept the output of a trajectory controller as input. This line prevents it from working:

if (interface.get_name() != get_node()->get_name())

The trajectory controller requires that the interface name contains "position" or "velocity" or both. As far as I can tell, you might be able to configure the trajectory controller command interfaces like this:

  • my_controller_position_joint_1/my_controller
  • my_controller_position_joint_2/my_controller
  • ...
  • my_controller_velocity_joint_1/my_controller
  • my_controller_velocity_joint_2/my_controller
    I think it would be more compatible and straight forward if they were configured like this:
  • position/my_controller_joint_1
  • position/my_controller_joint_2
  • ...
  • velocity/my_controller_joint_1
  • velocity/my_controller_joint_2

The fix is simple, just change the equality comparison if (interface.get_name() != get_node()->get_name()) to a contains comparison. Now that I take a closer look, it seems it was meant to be this way from the error message.

@pac48
Copy link
Contributor Author

pac48 commented Jun 17, 2022

This should work if (interface.get_name().find(get_node()->get_name()) != std::string::npos)
Please let me know if I am misunderstanding this.

@pac48 pac48 changed the title Problem integrting trajectory controller and chainable interface Problem integrating trajectory controller and chainable interface Jun 17, 2022
@pac48
Copy link
Contributor Author

pac48 commented Jun 26, 2022

Okay, so there a few changed still waiting to be merged as of today which will enable the JTC. See ros-controls/ros2_controllers#318, ros-controls/ros2_control_demos#162, #667

@pac48 pac48 closed this as completed Jun 26, 2022
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

No branches or pull requests

1 participant