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

TF extrapolation into the past

asked 2011-10-26 10:37:13 -0500

joan gravatar image

I am running several nodes on my robot involving some tf frames. I am following the tf tree structure suggested by the ROS navigation stack. Without going further into specific details, I would like to know if someone has encountered in the same situation I am.

I launch my nodes through a launch file. Some of these nodes use tf transforms without problems along the execution, until I occasionally got the following error:

[ERROR] [1319643007.826130513]: TF Error: Lookup would require extrapolation into the past.  Requested time 1319642992.659315000 but the earliest data is at time 1319642999.409401932, when looking up transform from frame [/robot/front_laser] to frame [/robot/odom]

As I said, this transforms have successfully been resolved many times, but suddenly it seems I am requesting for a transform before the tf listener received its first message.

I am using the waitForTransform on this form:

ros::Time request_time = ros::Time(0);
tf_exists = tf_listener_.waitForTransform(target_frame, pose.header.frame_id, request_time, ros::Duration(1));

Then if I get the transform:

if(tf_exists)
{
  geometry_msgs::PoseStamped out_pose;
  tf_listener_.transformPose(target_frame, request_time, pose, fixed_frame, out_pose);
}

Has anybody experienced this same error before?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2011-10-26 19:56:21 -0500

The error message states that you want to resolve a tf frame about 15 seconds in the past. By default, the tf::TransformListener keeps only about 10 seconds of history.

Also, take a look at the tf::MessageFilter. It will do a lot of the annoying transform time synchronisation stuff, so you don't have to worry about it any more.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-26 10:37:13 -0500

Seen: 3,724 times

Last updated: Oct 26 '11