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

Revision history [back]

So, it is actually quite simple, just add this line to your launch file:

<param name="/use_sim_time" value="true" />

and play your bag file with the --clock argument:

rosbag play pioneer_laser_1.bag --clock

this modifications will make the clock of your bag file to be used, instead of the current system time. Without them, you would have a large difference in time between the time you got your laser scans and the current time of your static transformation. Then the system would disregard your static transform because your scans were too old.

cheers

So, it is actually quite simple, just add this line to your launch file:

<param name="/use_sim_time" value="true" />

and play your bag file with the --clock argument:

rosbag play pioneer_laser_1.bag --clock

this modifications will make the clock of your bag file to be used, instead of the current system time. Without them, you would have a large difference in time between the time you got your laser scans and the current time of your static transformation. Then the system would disregard your static transform because your scans were too old.

If you had recorded the static transformation together with the scan in the bag file, you would probably have it working in the first try.

cheers