Robotics StackExchange | Archived questions

Standalone utilization of AMCL

Hello to eveyone. I'm working on an industrial project and for the moment we cannot completely change all our existing software and use ROS. However we are very interested in localization, typically AMCL. Is there any possibility to use AMCL module as a separate module and receive position estimates to inject in our software ? Has anyone tried to do this already ?. Thanks in advance !

Asked by parevalosiles on 2019-12-05 04:56:27 UTC

Comments

Answers

I've not done this (so this is more an analysis of whether it'd be possible than an answer), but looking at amcl/src/amcl_node.cpp it would appear it implements the "make ROS nodes thin wrappers around non-ROS code" approach quite well.

The actual implementation of AMCL (ie: the algorithm) may be found in ros-planning/navigation/amcl/src/amcl, which contains a nr of plain .c and .cpp files. These files have been ported from Player in the early days of ROS. Sensor abstraction is provided by amcl/sensors, which contains no ROS whatsoever.

The ROS integration seems localised to amcl_node.cpp.

You should be able to mimic whatever that is doing with your own software and use amcl/src/amcl stand-alone (ie: without ROS). You'd have to provide the necessary sensor data to the algorithm and a map. Ideally you'd use the abstractions provided in amcl/sensors and amcl/src/amcl/map.

For all of this the headers may be found in the include sub directory of the package.


Note that AMCL (both the algorithm and the implementation found in the amcl ROS package) are quite old. Science has progressed and there may be much better alternatives available.

See Next Generation Navigation Localizer (AMCL, QMCL, Non-MCLs, Oh My!) for a discussion on ROS Discourse about this.

Asked by gvdhoorn on 2019-12-05 05:20:44 UTC

Comments

approach quite well.

The first time I've heard someone say something good about the AMCL code.

Asked by stevemacenski on 2019-12-05 11:49:39 UTC

Only about a very tiny architectural aspect of it ;)

See, I've linked to your Discourse discussion ..

Asked by gvdhoorn on 2019-12-05 11:52:24 UTC

with multiple functions you need to scroll through pages and pages to get to the end of ;-)

However +1 for the inline comments. I don't understand why everyone doesn't do this with highly technical code. It helps deeply with debug and someone else reading it (like me, 6 months later).

Asked by stevemacenski on 2019-12-05 11:57:50 UTC