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

Tf package extrapolation to the past

asked 2019-12-18 20:31:22 -0600

Chao Chen gravatar image

When I lookup for transform like below, (trans, rot) = self.listener.lookupTransform(\ self.robot_link, target_link, rospy.Time(0))

Error pops up:Lookup would require extrapolation into the past.

However, when I change this line to (trans, rot) = self.listener.lookupTransform(\ self.robot_link, target_link,

Error processing request: Lookup would require extrapolation into the future.

How can I solve this problem?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-19 10:19:50 -0600

Abhishekpg gravatar image

try adding

listener.waitForTransform(self.robot_link, target_link, rospy.Time(), rospy.Duration(4.0))

before lookuptransform

edit flag offensive delete link more



a 4 second timeout may be overkill, but something like 0.2s would be good

stevemacenski gravatar image stevemacenski  ( 2019-12-19 12:43:04 -0600 )edit

It does not work. It looks like my TF package have some delay in updating the transform. Every time when I initialize Rviz, it takes about 15 s to load up the transform.

Chao Chen gravatar image Chao Chen  ( 2019-12-21 15:19:26 -0600 )edit

Question Tools

1 follower


Asked: 2019-12-18 20:31:22 -0600

Seen: 107 times

Last updated: Dec 19 '19