0
$\begingroup$

Rosanswers logo

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?


Originally posted by federico.ferri on ROS Answers with karma: 41 on 2013-01-12

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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 ?


Originally posted by Eric Perko with karma: 8406 on 2013-01-12

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.