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

ros navigation navfn make plan after re-set the initialpose of AMCL

asked 2014-06-09 22:57:49 -0500

dalishi gravatar image

Hi all,

I have an observation when I re-set the initialpose of amcl by publishing to the initialpose topic and then sent goal to the navigation stack. The plan made by the navfn was still starting from the old pose of the robot rather than the new one that I just set. The navfn got the robot pose by looking up the transform published by amcl. Is this because the amcl need to take some time to publish the new transform after re-setting initialpose and navfn doesn't get the new robot pose immediately?

Please correct me if I am wrong and appreciate any solution on this. Thanks all.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-06-10 02:35:25 -0500

ahendrix gravatar image

From what I understand, the global planner doesn't re-plan unless the local planner fails to execute the current plan, so unless your pose update is large or makes it difficult for the local planner to run, I wouldn't expect navfn to re-plan. That said, if the correction to the pose is small, the local planner can probably handle it without needing to re-plan anyway.

As a side note, sending initial pose messages to AMCL frequently is probably a bad idea, because it will lose any confidence present in the particle filter, and is potentially quite expensive.

On the other hand, if you're only re-localizing infrequently (perhaps when the robot is docked?), then you may just need to wait for AMCL to finish updating its internal state before you publish a goal. Listening on the current_pose topic might be a useful way to get a callback when AMCL is done.

edit flag offensive delete link more

Comments

Hi ahemdrix, thanks for the detailed explanation. I dont re-initialize the robot frequently and only do it when the robot got stuck as you mentioned. Now after I re-initialize I just sleep for 1 sec to wait for amcl and it worked. I will try the current_pose topic as you suggested.

dalishi gravatar image dalishi  ( 2014-06-11 21:17:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-06-09 22:57:49 -0500

Seen: 522 times

Last updated: Jun 10 '14