Synchronization of Bag player and gazebo simulation

asked 2023-03-08 10:07:44 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, I have a saved bag tha contains just the cmd_vel topic for a turtlebot3 robot. I would like to play it and make the robot move but, since gazebo has a real time factor that is not 1, the robot is moving differently than expected. I have obtained the right movements by imposing the rate of the bag player as 0.9, that is the value that the real time factor of gazebo more often assume in my case. I don't want to rely on luck in getting the rate of the player as similar as I can to the real time factor, but I would like to have a sistematic way to synchronize the time stamping of my bag to the simulation time. I already tried to use '--clock' when playing the bag but is not working. Do you have any ideas? Thank you

edit retag flag offensive close merge delete