Ask Your Question
5

tf::TransformListener lookupTransform time error

asked 2011-11-10 01:25:26 -0500

Ugo gravatar image

Hi,

I'm trying to listen to a transform using a tf::TransformListener, but I get the following error:

[ERROR] [1320937607.066118093]: Exception thrown while processing service call: 
Lookup would require extrapolation at time 1320937602.045533235, 
but only time 1320937602.055791850 is in the buffer, 
when looking up transform from frame [/base_link] to frame [/mid_obj_preg_0]

I don't understand why I'm getting this error: if you look at the 2 time stamps, they're very close, and I initialized my tf_listener with a big buffer of 60seconds.

I also ran the view frames, and you can see that there's a transform from /base_link to /mid_obj_preg_0. Frames

The transforms from /camera_rgb_optical_frame to /mid_obj_preg_0 are published by the same tf::TransformBroadcaster. Should I be using one broadcaster per transform?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
6

answered 2011-11-10 10:49:17 -0500

tfoote gravatar image

It does not look like you are not doing anything wrong on the publishing side.

It looks like your problem is that you have only received one message so far from the publisher. (That message is unique to a single message in the buffer.) This is a common startup issue. Although you initialized the TransformListener with a 60 second buffer it has not had time to build up a history as it has only received one message concerning the link mentioned. Once your TransformListener has been listening for 60 seconds then it will have filled up it's buffer.

If you make your program robust to exceptions and either retry or just toss the data and wait for new data such that the buffer has had time to fill, I expect you'll find it starts working.

edit flag offensive delete link more

Comments

Hi Tully, Thanks for your answer. I ended up broadcasting my transforms and listening for it until I was able to read it.
Ugo gravatar image Ugo  ( 2011-11-10 20:47:03 -0500 )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

Stats

Asked: 2011-11-10 01:25:26 -0500

Seen: 1,781 times

Last updated: Nov 10 '11