Custom Effort ros_control Logic

asked 2016-04-12 15:40:35 -0500

aak2166 gravatar image

Hey all,

I am confused by a couple of the concepts in the ros_control framework, and how they are applied in a fairly non-conventional robotics project I am working on.

Essentially I need to provide a custom controller to take a setpoint from ROS (likely a single double passed through a service call, perform logic given the robot jointstates at that instant, then write three commands to the custom embedded hardware.

The actuators we are using are current based, and we are only worried about commanding the torque provided by that actuator.

The jointeffortinterface looks to be the correct interface to inherit from. So does that mean i will need to write a custom hardware interface for my embedded system, that populates the pos[], vel[], eff[] variables set from the embedded device in ROS, as well as populate the cmd[] variables from my controller? If this is the case I will need to write my read() and write() functionality in the hardware interface using some hardware communication framework?

Once that is done I also have my custom controller, which as far as I can tell watching Adolfo's Talk is the update() method of the controller manager. I would have to write my custom controller as well to take our setpoint from ros, the current jointstate values above, and calculate the correct commands to set the cmd[] variable. Finally, this is all wrapped together in a single node.

Is this anywhere close to what ros_control is actually doing? And how I would need to architect my controllers to have it work? Any clarification is greatly appreciated.

edit retag flag offensive close merge delete