ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

when tf2::ExtrapolationException occured, move_base died

asked 2016-10-25 01:42:19 -0600

jxl gravatar image

updated 2016-10-25 01:44:41 -0600

when i use Sick Tim561 with this sick_tim package ,sometime laser will disconnect and reconnected , but sometime laser is OK when navigation .why this occasionally happen, i have not found the reason . when laser reconnected,the TF timestamp errors ,it throws

terminate called after throwing an instance of 'tf2::ExtrapolationException' what(): Lookup would require extrapolation into the future. Requested time 806.12... but the latest data is at time 806.08... when looking up transform from frame [odom] to frame [map] - and then move_base node died,the robot base lost control. Is there exist someway to prevent move_base being died, when laser reconnected? If this exists,how can i do ? - Any suggestions will be appreciated.Thanks.

image description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-10-25 01:58:05 -0600

alienmon gravatar image

updated 2016-10-25 02:25:16 -0600

I'm not sure if this is your issue or not as I never use sick_tim pkg.

But I think the issue is in the transform :

Requested time 806.12... but the latest data is at time 806.08... when looking up transform from frame [odom] to frame [map]

Take a look at tf and time :

I suspect that you use ros::Time::now().

You should use ros::Time(0) instead to get the latest available transform in the buffer. Because there is a travel time in between sending the transform and receiving it in the buffer.

Alternatively you can use ros::Time::now() - delay


See the change log

adjust time stamp - last scan point = now ==> first scan point = now - 271 * time increment - also just assume 0.001 s USB latency between scanner and PC for now this avoids TF ExtrapolationExceptions (cannot project into future)

You may try increasing the time difference e.g. the 271 to 350

edit flag offensive delete link more


@alienmon ,Thanks very much:) I tried to find codes which use ros::Time::now() in navigation stack,but I failed.Because lookupTransform() throws exception with logger level [DEBUG] ,[INFO], [WARRN] or [ ERROR],but this error without logger level .I am confused.

jxl gravatar image jxl  ( 2016-10-26 03:40:05 -0600 )edit

@alienmon,thank you very much .When i try to replace the robot hardware circuit board, the problem disappeared.Even if laser reconnected successfully, move base not died any more .

jxl gravatar image jxl  ( 2016-10-28 08:15:45 -0600 )edit

Question Tools

1 follower


Asked: 2016-10-25 01:42:19 -0600

Seen: 553 times

Last updated: Oct 25 '16