Hector_mapping Transform fails after some time

asked 2020-08-28 09:27:29 -0600

parzival gravatar image

Friends, I'm facing an issue with hector_mapping. The mapping starts fine, but after some time, I get the following error:

Transform failed during publishing of map_odom transform: Lookup would require extrapolation into the future.  Requested time 1598623117.729725247 but the latest data is at time 1598623117.563725413, when looking up transform from frame [base_link] to frame [odom]

The time difference in error messages always differs by ~200ms. The error appears randomly, and once it appears, no further mapping occurs. But before getting this error the mapping works perfectly.

How to avoid this tf race condition?

System setup:TFs are available for map->odom->base_link->laser, map->odom given by hector_mapping, odom->base_link given by differential drive, base_link->laser by a static transform publisher. Robot computer is a raspberry pi 3b, workstation computer is an Intel i5, both running Ubuntu 16.04 ROS Kinetic, time synced via ntpdate using time server at time.windows.com. Hector_mapping and rviz is run via workstation computer to make sure it is not an issue with limited compute power.

I've referred to following questions and tried solutions/ideas in all of their answers/comments but nothing works:







Any help would be much appreciated. Thank you :)

edit retag flag offensive close merge delete


I also came across this wonderful page: http://wiki.ros.org/tf/Errors%20expla... and I think the problem is similar to what is mentioned in second point under "6. Error: ExtrapolationExceptions" So a potential solution is to add a tf::MessageFilter in hector_mapping.

Has anyone done this before? Or is there a simpler solution which doesn't include changing hector_mapping package code?


parzival gravatar image parzival  ( 2020-08-29 03:08:18 -0600 )edit