Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ros_controls resource allocation

I have used ros_controls to wrap hardware that has a velocity interface and turn it into a position controller. In other words I used velocity_controllers/JointPositionController to turn my velocity interface into a position interface.

Now I would like to use my position interface and have it controlled by position_controllers/JointTrajectoryController. However, when I try to load the JointTrajectoryController with my wrapped joint included I get a resource conflict. It seems the way I have defined the resources ros_controls considers the entire joint a resource. In my case I need a resource for the velocity interface and a separate one for the position interface. I'm not sure how to define this, do I need 2 state handles with the same inputs? I.E.

    hardware_interface::JointStateHandle state_handle_joint("joint_vel", &joint_pos, &joint_vel, &joint_eff);
    hardware_interface::JointStateHandle state_handle_joint("joint_pos", &joint_pos, &joint_vel, &joint_eff);

Or I guess I'm asking how do I get a resource for each interface on a joint?