Robotics StackExchange | Archived questions

ros_controls resource allocation

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

Now I would like to use my position interface and have it controlled by positioncontrollers/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 roscontrols 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);
    jnt_state_interface.registerHandle(state_handle_joint);
    hardware_interface::JointStateHandle state_handle_joint("joint_pos", &joint_pos, &joint_vel, &joint_eff);
    jnt_state_interface.registerHandle(state_handle_joint);

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

Asked by AMatt on 2017-03-07 17:41:51 UTC

Comments

Answers