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

How to resoleve Exception: Lookup would require extrapolation into the future?

asked 2016-07-12 11:40:42 -0500

anilmullapudi gravatar image

I was publishing a frame using launch file.

I was getting below errors. tf2.waitForTransform(src_fram, des_frame, rospy.get_rostime(), rospy.Duration(10.0)); Exception: Lookup would require extrapolation into the future. Requested time 1468340743.794792891 but the latest data is at time 2117.120000000, when looking up transform from frame [bed_frame] to frame [wide_stereo_optical_frame]. canTransform returned after 10.0004 timeout was 10.

I have used all time combinations such as rspy.Time(), rospy.get_rostime(), and but no luck. i also used sleep function for 10 seconds before waitForTransform, this is also not worked

here is my code

def getTransformedPoint(faceCoordinate, src_fram, des_frame):
point = PointStamped()
point.point.x = faceCoordinate[0];
point.point.y = faceCoordinate[1];
point.point.z = faceCoordinate[2];
point.header.frame_id = src_fram;
point.header.stamp = rospy.Time();
print "rospy.Time(): ",point.header.stamp;
print "rospy.get_rostime(): ",rospy.get_rostime();
print " ",;

tf2.waitForTransform(src_fram, des_frame, rospy.Time(), rospy.Duration(10.0));

desired_frame = tf2.transformPoint(des_frame, point)
print desired_frame
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-12 13:24:41 -0500

anilmullapudi gravatar image

The above code is working after setting simulation time to true in the launch file.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-07-12 11:40:42 -0500

Seen: 2,052 times

Last updated: Jul 12 '16