ROS bags + Gazebo synchronization issue

asked 2018-12-07 09:39:51 -0500

Bruno Vieira gravatar image

Dear all,

I'm having an issue currently on trying to record some ROS bags to replicate some robot movements during a Gazebo simulation.

I'm starting to record the referred bags after I start my controller application who just reads keyboard inputs and publishes into a ROStopic the changes, that might happen or not depending on what key pressing is done(or not), even if there are no changes to the values advertised for this topic, their publication is still done on a fixed frequency.

The problem i'm facing is that the created bag doesn't replicate this as synchronized as it should(i.e the robot starts to change his direction earlier in the simulation that what was recorded over)...

I get this output from the first lines of the rosbag play:

[ INFO] [1544196733.072599942]: Opening 11111.bag Waiting 0.2 seconds after advertising topics... done. Hit space to toggle paused, or 's' to step. [DELAYED] Bag Time: 0.101000 Duration: 0.000000 / 189.299000 Delay: 0 [RUNNING] Bag Time: 0.101000 Duration: 0.000000 / 189.299000
[RUNNING] Bag Time: 0.101000 Duration: 0.000000 / 189.299000
[RUNNING] Bag Time: 0.101129 Duration: 0.000129 / 189.299000
[RUNNING] Bag Time: 0.200516 Duration: 0.099516 / 189.299000
[RUNNING] Bag Time: 0.300226 Duration: 0.199226 / 189.299000

What may be causing this issue? Take in mind that this synchronization issue always happens(different bags recorded and tested already) by the bag changing the topic values earlier(some seconds) than when they were recorded...

For further needed description on the methodology I'm following for recording or related to the application that is controlling this topic publication, i'm clearly the one interested in clarifying this.

Thank you.

Best regards, Bruno Vieira

edit retag flag offensive close merge delete