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

TF_OLD_DATA error in laser_pipeline tutorial with bagfile

asked 2014-08-06 11:14:26 -0500

lucaluca gravatar image

updated 2014-08-07 08:51:33 -0500

Hi, I'm following this tutorial:

However, I cannot see the point cloud if I try to reproduce a bagfile and in the console in which I launched the node that should convert the laser scans into a point cloud I'm getting a lot of messages like:

TF_OLD_DATA ignoring data from the past

I already used this command that should have solved the problem:

rosparam set use_sim_time true

Any ideas about how to solve this problem?

EDIT: I want to add a couple details. This is the exact error:

at line 260 in /tmp/buildd/ros-hydro-tf2-0.4.10-0precise-20140304-0005/src/buffer_core.cpp Warning: TF_OLD_DATA ignoring data from the past for frame wide_stereo_optical_frame at time 1.275e+09 according to authority /play_1407416604376477595 Possible reasons are listed at 1.336857e-312xplained

The bagfile I'm using is the bagfile of this tutorial:

Apart from setting use_sim_time to true, I also used the "--clock" parameter when playing the bagfile. I noticed a couple interesting things:

1) the first time I launch the bag file, no error pops out in the console window of the converting node. They come out from the second run on.

2) I launched the command "rosrun tf tf_monitor odom_combined base_link" and I saw that the results were "avg = 0.0826798: max = 0.155032" that seem a little bit too high, but raising the tolerance to 1 second didn't make any difference.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-06 11:26:55 -0500

l0g1x gravatar image

updated 2014-08-07 10:23:15 -0500

The bag file in which you are running is using the timestamp from which you recorded the data. Are you passing on the timestamp from the bag file data? if you are, set the timestamp of the new data to ros::Time::now(). Let me know what happens


Okay now it makes sense to why your getting this problem. When you start your converter node, it listens for your laser scan data which obviously contains time stamps in the header message. Once you run the bag the first time and it finishes, the time stamp that the last laser scan message contained will be stored in your converter node. Your time stamp in your converter node will now stay the same until it is updated again. Just for reference lets say that time_x is the beginning time of your bag (10:12am), and time_z is last time stamp of your bag (10:14am).

However, when you want to run the bag again, your converter node's time stamp was last set to time_z (10:14am). So it makes sense to why your getting a TF_OLD_DATA, because when you try to transform your data in the converter node, tf wont transform if your new piece of data (10:12am) is older then your current one (10:14am).

Hope that makes sense. This same thing happened to me except with robot_pose_ekf; I kept the node open and reran the bag data and i got same errors. Restart the node or add something that will reset that time stamp before you all the transform function.

edit flag offensive delete link more


@l0g1x thought the same, but I don't know how to solve the problem. The parameter "use_sim_time" should have solved it. However, I'm not passing the timestamps from the bag file, but I'm just using "rosbag play". Should I change the way I'm working?

lucaluca gravatar image lucaluca  ( 2014-08-07 04:19:29 -0500 )edit

I added a couple details to the question

lucaluca gravatar image lucaluca  ( 2014-08-07 08:08:06 -0500 )edit

Okay i coincidentally reproduced the same TF_OLD_DATA error last night except with robot_pose_ekf. I first started the ekf node, and THEN i played the bag data. Not 100% sure if this will work in your case though. Start your pointcloud converter node, and then play the bag. let me know what happens

l0g1x gravatar image l0g1x  ( 2014-08-07 08:20:31 -0500 )edit

@l0g1x that was what I was doing, but it didn't make any difference. But I have a couple news that I'm going to add right now at the bottom of the question

lucaluca gravatar image lucaluca  ( 2014-08-07 08:47:47 -0500 )edit

Any lucky?

l0g1x gravatar image l0g1x  ( 2014-08-08 07:59:24 -0500 )edit

@l0g1x this is reasonable but it didn't seem to solve my problem. However, I'm very busy right now, so I will let you know in few days ;)

lucaluca gravatar image lucaluca  ( 2014-08-13 09:36:01 -0500 )edit

Question Tools

1 follower


Asked: 2014-08-06 11:14:26 -0500

Seen: 1,178 times

Last updated: Aug 07 '14