How can I reset the simulated clock?
I have a simulator running which publishes the /clock
topic, and I have the /use_sim_time
parameter set to true.
When I start my ROS core and run the simulator the first time, things run normally.
If I stop the simulator and restart it, restarting the clock at 0, I get TF warnings from all of the nodes that are subscribed to TF:
[ WARN] [1399927275.284426178, 678.770000000]: TF_OLD_DATA ignoring data from the past for frame local_utm at time 678.77 according to authority /simulator
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
Is there any way to reset the clock and clear the TF buffer?
According to this post, there should be a /reset_clock
topic that I can publish a std_msgs::Empty to to trigger a clock reset, and a Reset
button in rivz which will do this for me, but the /reset_clock
topic doesn't seem to exist, and while the button in rviz still exists, it doesn't seem to have the desired effect.
I'm currently using ROS Hydro on Ubuntu 12.04.
I think the Reset button in rviz is only for rviz.
I have the same problem. Did you fix it?
I haven't found a solution for this yet. I've opened a bug against tf2, but it hasn't gotten any attention from the maintainer: https://github.com/ros/geometry_exper... . As a workaround, I've created launch files for the nodes that need to be restarted, and restart them frequently.