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

AMCL and global localisation

asked 2011-08-02 03:15:57 -0500

Hello everyone, I'm trying to use the global localisation facilities of AMCL node (calling global_localization service), but every time I try to invoke it, AMCL stop working (publishing the corresponding transformation) and the CPU usage of the process jump up to 99~100%

Also, a similar problems occurs some times when AMCL is not well localised.

Any idea why?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2011-08-02 22:20:26 -0500

I know how AMCL should work.

After looking at the code I realised that the current AMCL implementation, get stuck while sampling uniformly from the free space in the map for global localisation (it generated more than a million invalid samples before I killed it). A quick fix I did was to look for free space in the map, store the corresponding indices in an array, and sample from the index array uniformly.

edit flag offensive delete link more

Comments

Sounds to me like you should submit a patch! (Also, probably accept your own answer)
Mac gravatar image Mac  ( 2011-08-03 06:52:38 -0500 )edit
Are you thinking to submit a patch? I have the same problem : amcl gets stuck when perform global localization!
luca gravatar image luca  ( 2011-09-01 19:10:50 -0500 )edit
Not sure whether it came from Javier or not, but this looks like the appropriate patch: https://code.ros.org/trac/ros-pkg/ticket/5115. We'll get it integrated soon. If you try it out, please comment on the ticket to say whether it fixed the problem for you.
Brian Gerkey gravatar image Brian Gerkey  ( 2011-09-02 04:56:19 -0500 )edit
The patch in the ticket referenced above has been applied to trunk of navigation and should go out in the next release. Hopefully, that'll fix things. Many thanks to Javier for the patch.
eitan gravatar image eitan  ( 2011-09-06 06:21:46 -0500 )edit
2

answered 2011-08-02 18:06:35 -0500

Mac gravatar image

This is because AMCL is a particle filter; in order to localize globally, it needs many, many particles, which means much, much computation. Similarly, when AMCL is not well localized, it will generate more particles per step, and therefore require more computation.

The 'A' in AMCL (for "adaptive") refers to the algorithm's ability to choose the particle count automatically, for exactly this reason.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2011-08-02 03:15:57 -0500

Seen: 3,650 times

Last updated: Aug 02 '11