Ask Your Question
1

transform base_link<->map not available, but both base_link<->odom and odom<->map are available (???)

asked 2013-01-12 04:24:11 -0600

federico.ferri gravatar image

updated 2014-01-28 17:14:49 -0600

ngrennan gravatar image

Hi, I'm using stage and slam_gmapping. Frame hierarchy is: /map->/odom->/base_footprint->/base_link->/base_laser_link.

I need to do some operations with the occupancy grid and the laser scan, and I need the position of the robot wrt the map.

Whenever I ask for the robot position (using the tf_echo program, or in C++ using TransformListener), I'm unable to retrieve the transform base_link<->map.

The error is (when running: rosrun tf tf_echo base_link map): Exception thrown:Lookup would require extrapolation into the past. Requested time 4.400000000 but the earliest data is at time 1358007388.064145711, when looking up transform from frame [/map] to frame [/base_link]

or (if I swap source and target frames): Exception thrown:Unable to lookup transform, cache is empty, when looking up transform from frame [/base_link] to frame [/map]

HOWEVER, when individually looking up transforms map<->odom and odom<->base_link, both transformations are found! How can this be?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-12 06:15:17 -0600

Eric Perko gravatar image

updated 2013-01-12 06:15:29 -0600

Based on the error you get from rosrun tf tf_echo base_link map, I would guess that the odom<->map and base_link<->odom transforms are in different time epochs. That would explain why each transform seems to work but trying to concatenate them doesn't.

Can you verify that both the odom<->map and base_link<->odom transforms have similar timestamps (you may need to inspect the output of the /tf topic) or double check whatever node you have that is outputting base_link<->odom ?

edit flag offensive delete link more

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: 2013-01-12 04:24:11 -0600

Seen: 1,727 times

Last updated: Jan 13 '13