ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Have you tried using the --clock argument when playing the bag file?

more info: here and in the wiki

Have When you tried using play a bag file, it has a time associated with the messages. When you launch your local modules, they will normally use the current time of your computer. The problem here is that the time of the bag file and the current time are likely to be far apart, so you need to force the bag file time to be used by all your local programs. To do this you must:

  1. set the use_sim_time parameter to true:

    rosparam set use_sim_time true

  2. play your bag file with the argument --clock:

    rosbag play xxxx.bag --clock argument when playing the bag file?

I hope this solve your issue. For further info you can check this page

more info: here and in the wiki

When you play Yes, there is a bag file, it has a time associated with the messages. When you launch your local modules, they will normally use the current time of your computer. The problem here is that the time of the bag file and the current time are likely to be far apart, so you need way to force the bag file ROS system time to be used by all use the time stored in your local programs. bagfile. To do this you must:

  1. set the use_sim_time parameter to true:

    rosparam set use_sim_time true

  2. play your bag file with the argument --clock:

    rosbag play xxxx.bag --clock

I hope this solve your issue. For further info you can check this page

more info: here and in the wiki