Does ros::Duration::sleep spin?
If I do ros::Duration::sleep does ros spin and are callback functions called?
If not is there a way to pause the program while still managing callbacks?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
If I do ros::Duration::sleep does ros spin and are callback functions called?
If not is there a way to pause the program while still managing callbacks?
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.
If your question is answered, could you post, for the record, which approached you ended up using?.
Asked: 2015-02-25 02:44:08 -0500
Seen: 4,987 times
Last updated: Feb 25 '15
Why isn't rospy.Rate.sleep() terminating?
Gazebo world reset and Duration sleep
How time, clock and duration work in ROS 2 and how it is different from ROS 1?
Ensuring time synchronization on multi-machine setup
Why isn't ROS using its own clock server for live situations?
Issue with ros::Time when using /use_sim_time
Use system time as default for a node's clock
Why the output of some topic delays with IDEs?
can't synchronize Velodyne points with other PointCloud2 data [closed]
Simulated /clock stops during playback of rosbags recorded using the API