Search code examples
ros

Rosplay "Bag time" starts 20 sec after rosrecord


I'm using Rosbag to record a F1 robot simulated in Gazebo. When i record the F1 everything is OK but qhen i use "Rosbag play" the record is not synchronized with the movement of the F1 that i recorded. The "Bag time" starts in the second 20 but the duration starts in second 0 so the F1 turns early

I've tried with "rosparam set use_sim_time true" and "rosbag play xxxx.bag --clock" but it didn't work.

Any idea?

Thanks!


Solution

  • Presumably, the topics you record publish their first message after 20 seconds. Thus, when the first 20 seconds are empty, rosbag play skips this delay. Just record more topics which also start to publish at your desired time.