Ask Your Question

Lookup would require extrapolation into the past but rqt shows required time is in range.

asked 2019-11-06 21:59:29 -0500

pan gravatar image

updated 2019-11-07 04:18:48 -0500

  • ubuntu16.04

  • tf usage

  • error message:

    Lookup would require extrapolation into the past. Requested time 1572576373.995487268 but the earliest data is at time 1572576374.014772881, when looking up transform from frame [base_footprint] to frame [odom]

rqt show:

image description

code is here:

 void getTF(const string parent_frame,
                   const string child_frame,
                   const ros::Time time_stamp,
                   tf::StampedTransform& transform){
            static tf::TransformListener tf_listener;
                tf_listener.waitForTransform(parent_frame, child_frame, time_stamp, ros::Duration(1.0));
                tf_listener.lookupTransform(parent_frame, child_frame, time_stamp, transform);
            }catch(tf::TransformException ex){


rqt shows transformation time snapshot between odom and base_footprint is [1572576373.99, 1572576379.38], the required time 1572576373.995487268 should be valid; besides, error message shows the earliest data is at time 1572576374.014772881, why not 1572576373.99 ?

edit retag flag offensive close merge delete


Please do not post screenshots of code. There is no need: it's all text. Copy-paste it into your question and format it properly using the Preformatted Text button (the one with 101010 on it).

Please also review the support guidelines, specifically the sections about not posting screenshots.

gvdhoorn gravatar image gvdhoorn  ( 2019-11-07 02:12:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-11-07 01:31:37 -0500

wintermute gravatar image

I had similar error, and solved it by changing the rates of tf's.

You have 2 transforms at 10000 and one at 50hz. I would try changing those.

Best, Can

edit flag offensive delete link more


base_footprint --> laser_front is tf_static publishded by robot_state_publisher. map --> odom depends on matching result. what confused me mostly is that the earliest data is at time 1572576374.014772881 instead of 1572576373.99.

pan gravatar image pan  ( 2019-11-07 20:05:16 -0500 )edit

it could be also me a mismatch of clocks of sensors. Are your messages provided from sensors have their timestamps, or are you stamping them on arrival? I am having similar errors from time to time, which are eliminated with a reset of boards.

wintermute gravatar image wintermute  ( 2019-11-08 01:15:04 -0500 )edit

yes, messages have their timestamps from their ros wrapper package respectively. I just recorded a rosbag and played it.

pan gravatar image pan  ( 2019-11-11 01:11:40 -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

1 follower


Asked: 2019-11-06 21:59:29 -0500

Seen: 255 times

Last updated: Nov 07 '19