ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
If I do ros::Duration::sleep does ros spin and are callback functions called?
No. Sleep just sleeps the thread for the specified duration.
If not is there a way to pause the program while still managing callbacks?
You can have a loop that alternates sleeping and spinning, as exemplified in this roscpp tutorial, or you can have separate spinner threads. I recommend reading the ROS wiki page on callbacks and spinning.