You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
changed the title
Problem integrting trajectory controller and chainable interface
Problem integrating trajectory controller and chainable interface
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:
ros2_control/controller_interface/src/chainable_controller_interface.cpp
Line 70 in d632e89
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:
I think it would be more compatible and straight forward if they were configured like this:
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.The text was updated successfully, but these errors were encountered: