Ask Your Question
0

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, rospy.Time.now())

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
0

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

Comments

1

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

stevemacenski gravatar imagestevemacenski ( 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 imageChao Chen ( 2019-12-21 15:19:26 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 18 times

Last updated: Dec 19 '19