Skip to content

Problem integrating trajectory controller and chainable interface  #735

@pac48

Description

@pac48

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions