AMCL aborts global costmap
I have problems with Rviz2 when pose estimating a robot.
I get the following error:
[amcl-15] [INFO] [1649166945.999995726] [robot1.amcl]: initialPoseReceived
[amcl-15] [WARN] [1649166946.000590096] [robot1.amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future. Requested time 1649166945.998883 but the latest data is at time 20.984000, when looking up transform from frame [odom] to frame [base_footprint])
[amcl-15] [INFO] [1649166946.000688191] [robot1.amcl]: Setting pose (20.981000): 0.918 0.422 0.007
The global costmap shows up correctly for 1 second (Image 1) before throwing the above error and removes it. Then I am left with only a local costmap (Image 2). The robot can still navigate, but it is not nearly as good without the global costmap.
Image 1
Image 2
Any ideas?
It's a bit hard to reproduce the error without exact steps, but this seems like some of your nodes are running with use_sim_time set to true, while some are set to false.
If you're running a simulation in gazebo, you should set use_sim_time to true for all related nodes.
I was playing around with
PushRosNamespace
, and I might have given theuse_sim_time
a namespace... It was fixed by doing a more manual namespace convention.Great, would you be able to post your comment as an answer so we can close this question off?