2

I'm currently trying to synchronize the ROS time with Webots. What I'm expecting:

  • The ROS time is fully depends on the Webots time. If the simulation starts running slowly, the ROS time should slow down as well, if I run webots in fast mode (> real-time), the ros time should run faster as well.

However, I'm currently not able to synchronize webots to achieve the above behavior. I followed the instructions mentioned in the Webots documention and in this thread of the old webots forum and set the ros_controller arguments --use_sim_time, --clock and --synchronize to be true, with no success. Both Times still run independently from each other.

I would be glad if anyone would have some feedback how one can achieve the synchronization.

Best regards

1 Answers1

2

It seems you missed one step, you have to set the ROS /use_sim_time parameter to true before starting your ROS node and the simulation so that it will use the time published by the /clock topic: http://wiki.ros.org/Clock#Using_Simulation_Time_from_the_.2BAC8-clock_Topic

David Mansolino
  • 1,713
  • 7
  • 13
  • 1
    You were totally right, just forgot to enable the synchronization also from the ROS side of things. Thanks a lot for pointing it out! – Jan-Felix Klein Mar 13 '19 at 12:56