Rosanswers logo

Hi all,

I am looking for an example of how to use controller_manager::ControllerManager. I have read a tutorial on implementing one's own hardware interface (see here) and there is a few lines of code (including a main function) related to my problem. But unfortunately I do not understand where this main function should lie (is it into a specific node?). I am not too sure either how it should articulate with the controller_manager spawner node instantiated in the launch file.

I have checked several repos (like D. Coleman's baxter, and the husky ros files...) but could not find any code relevant to me.

Is there any example somewhere showing me how to use the ControllerManager in c++?

--- EDIT --- To put it another way here it shows a main() implementing the logic of the robot read/write and controllers update. But who starts the app corresponding to the main? Is this a node? And external app? Something else?



Originally posted by arennuit on ROS Answers with karma: 955 on 2014-10-10

Post score: 2


1 Answer 1


Rosanswers logo

The example quoted in the question is a decent one, as it's possibly the simplest setting. There are a few practical details missing, but it gives a good idea of what needs to be done.

A similar but more complete example is detailed in the ROSCON 2014 talk entitled ROS control: an overview (program with slides and video). Here you can see how the main function initializes a ros node, which you can then launch via rosrun/roslauch. Let us know if you still have questions along these lines.

Originally posted by Adolfo Rodriguez T with karma: 3907 on 2014-10-14

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by arennuit on 2014-10-14:
Ha! I believe your second example is relevant, I will look into deeper. Thanks!

Comment by Adolfo Rodriguez T on 2014-10-16:
Was the example detailed enough to answer your question?. If so, please mark it as such, otherwise the robot-control SIG is the best place to continue a more detailed discussion. Thanks!.

Comment by arennuit on 2014-10-16:
This is done!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.