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

rosbag replay error (use sim time problem)

asked 2019-06-06 14:04:17 -0500

Dina gravatar image

updated 2019-06-07 10:22:02 -0500


I am very new to ROS. I am trying to replay a recorded bag file containing point cloud2 topic with map as the fixed frame and my lidar unit as the reference frame in simulation time but I am receiving a status error under the pointcloud2 mentioning

Transform[sender=unknown publisher] message removed because it is too old (frame=[/os1_lidar ], with an ongoing timestamp which is different from both of my ros time and wall time. my wall time and ros time ar running aligned.

I have tried to replay the pointcloud2 topic with both in false and true sim_time it does not work and coming up with the same error. However, when I am putting base_link(lidar unit) as both the reference and the fixed frame it's replaying the pointcloud2 topic. But I need to visualize it with map as the fixed frame and base_link(lidar) as the reference frame.

May I know whether I can upload any picture regarding my problem.

Thank you for your time.

edit retag flag offensive close merge delete



Possible reasons are listed at

have you checked that page?

gvdhoorn gravatar image gvdhoorn  ( 2019-06-06 14:44:59 -0500 )edit


Thank you very much for your kind reply. I followed the site.Here is my launch file code.

<launch> <node pkg="rviz" type="rviz" name="rviz" args="-d $(find lego_loam)/launch/test.rviz"/>

<!--- TF -->
<node pkg="tf2_ros" type="static_transform_publisher" name="camera_init_to_map"  args="0 0 0 1.570795   0        1.570795 map    camera_init" />
<node pkg="tf2_ros" type="static_transform_publisher" name="base_link_to_camera" args="0 0 0 -1.570795 -1.570795 0        camera base_link" />
<node pkg="tf2_ros" type="static_transform_publisher" name="baselink_to_os1sensor" args="0 0 0 0 0 0  base_link os1_sensor"/>

<!--- LeGO-LOAM -->    
<node pkg="lego_loam" type="imageProjection"    name="imageProjection"    output="screen"/>
<node pkg="lego_loam" type="featureAssociation" name="featureAssociation" output="screen"/>
<node pkg="lego_loam" type="mapOptmizatio
Dina gravatar image Dina  ( 2019-06-06 22:39:47 -0500 )edit

But I am still getting the same error. I set up the simulation time as true following the site.

In my RVIZ when I am trying to add the pointcloud2 topic from a recorded bag file with map as the fixed frame. it's saying

"Transform [sender=unknoiwn publisher] Message removed because it is too old"

my errors are like as follow while running the "rqt_tf_tree" in the terminal-

Warning: TF_OLD_DATA ignoring data from the past for frame laser_odom at time 1.55963e+09 according to authority /featureAssociation Possible reasons are listed at at line 277 in /tmp/binarydeb/ros-kinetic-tf2-0.5.20/src/buffer_core.cpp

Can you please recommend a possible solution to resolve this problem ?

Thanks Dina

Dina gravatar image Dina  ( 2019-06-06 22:49:04 -0500 )edit

Please do not post this sort of update in a comment. Edit your original question.

gvdhoorn gravatar image gvdhoorn  ( 2019-06-07 05:51:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-08 18:52:38 -0500

JustinBlack02 gravatar image

This can be caused by a variety of reasons which only you can really debug. I would suggest trying the following:

rosparam set use_sim_time true

To make sure nodes use the /clock topic for time and run you bag using

rosbag play --clock [your bag here]
edit flag offensive delete link more

Question Tools



Asked: 2019-06-06 14:04:17 -0500

Seen: 2,024 times

Last updated: Jun 08 '19