ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can replace your loops which use a rate-sleep with a timer and perform your action in the timer callbacks. See the corresponding timer tutorial: http://wiki.ros.org/roscpp_tutorials/Tutorials/Timers Then you only need a single spin() call at the end of your main.