Robotics StackExchange | Archived questions

Extrapolation Error looking up robot pose: Lookup would require extrapolation into the past. Requested time 5381.303000000 but the earliest data is at time 5381.316000000, when looking up transform from frame [base_footprint] to frame [map]

Hi

I am running cartographer_turtlebot with my own bag.

The mapping works, but the terminal outputs ERROR (in the rviz, you can see the submap just jump to some other place then jump back)

below is the ERROR

Extrapolation Error looking up robot pose: Lookup would require extrapolation into the past.  Requested time 5381.303000000 but the earliest data is at time 5381.316000000, when looking up transform from frame [base_footprint] to frame [map] 

I checked the tf_tree and confirmed the tree connection is:

map -> odom -> basefootprint -> baselink so the base_footprint is connected to the map.

Why there is a error?

Thank you

Asked by sinsinsinsin on 2020-02-27 13:21:20 UTC

Comments

Is your rosbag publishing the /clock? If so, did you set use_sim_time with rosparam set use_sim_time true when running Carthographer?

Asked by Wilco Bonestroo on 2020-02-27 15:30:52 UTC

Answers

I had this issue, calling waitForTransform() before lookupTransform() worked for me. The turtle takes some time to spawn, so the lookupTransform() doesn't see the turtle at the beginning. The function waitforTransform() waits for the first transform to appear.

You can find it here (just above 1.2 The Code Explained) : http://wiki.ros.org/tf/Tutorials/Writing%20a%20tf%20listener%20%28C%2B%2B%29

Asked by edote on 2020-02-28 06:26:32 UTC

Comments