ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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
.