How can I reset the simulated clock?

asked 2014-05-12 10:46:29 -0500

ahendrix gravatar image

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

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.

edit retag flag offensive close merge delete


I think the Reset button in rviz is only for rviz.

dornhege gravatar image dornhege  ( 2014-05-12 13:03:32 -0500 )edit

I have the same problem. Did you fix it?

Luis E. Rubio gravatar image Luis E. Rubio  ( 2014-09-10 04:11:27 -0500 )edit

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: . As a workaround, I've created launch files for the nodes that need to be restarted, and restart them frequently.

ahendrix gravatar image ahendrix  ( 2014-09-10 04:45:10 -0500 )edit