Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.