"Extrapolation into the future" error when running find_object_3d

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

"Extrapolation into the future" error when running find_object_3d

bolt
Hi,

When running the find_object_3d example using

$ roslaunch freenect_launch freenect_launch.launch depth_registration:=true
$ roslaunch find_object_2d find_object_3d.launch
$ rosrun rviz rviz

I receive persistent warnings of the form

[ WARN] [1489930130.781721522]: Lookup would require extrapolation into the future.  Requested time 1489930130.251293115 but the latest data is at time 1489930129.751276853, when looking up transform from frame [object_30] to frame [map]

Looking at the output from tf view_frames below, it seems that find_object_3d is publishing at a slower rate than the static transform publishers. Is the issue that find_object is trying to use the latest transforms from /map_to_odom_tf etc, which don't sync with its own latest transform? How can I fix this?

Many thanks for your help!


Reply | Threaded
Open this post in threaded view
|

Re: "Extrapolation into the future" error when running find_object_3d

matlabbe
Administrator
Hi,

before the try/catch here, you can add a waitfortransform() before:
std::string errorMsg;
if(tfListener_.waitForTransform(mapFrameId_, objectFrameId, msg->header.stamp, ros::Duration(waitForTransform), ros::Duration(0.5), &errorMsg))
{
	// do try/catch lookupTransform() here
}
This will wait 500 ms for the transform.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: "Extrapolation into the future" error when running find_object_3d

bolt
Many thanks, this did the trick.