ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

AMCL aborts global costmap

asked 2022-04-05 10:13:54 -0600

WarTurtle gravatar image

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 description

Image 2 image description

Any ideas?

edit retag flag offensive close merge delete


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.

ijnek gravatar image ijnek  ( 2022-04-06 02:15:07 -0600 )edit

I was playing around with PushRosNamespace, and I might have given the use_sim_time a namespace... It was fixed by doing a more manual namespace convention.

WarTurtle gravatar image WarTurtle  ( 2022-04-06 06:47:05 -0600 )edit

Great, would you be able to post your comment as an answer so we can close this question off?

ijnek gravatar image ijnek  ( 2022-04-06 07:01:42 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2022-04-06 07:14:25 -0600

WarTurtle gravatar image

As per ijnek, the error probably occured due to a missmatch of use_sim_time. While playing around with PushRosNamespace, I might have inadvertently pushed a namespace onto that parameter, so it ended up with something like namespace/use_sim_time which resulted in the error. Doing a more hardcoded/manual namespacing convention, the error was reverted.

edit flag offensive delete link more

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: 2022-04-05 10:13:54 -0600

Seen: 57 times

Last updated: Apr 06 '22