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

Standalone utilization of AMCL

asked 2019-12-05 03:56:27 -0600

parevalosiles gravatar image

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 !

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-12-05 04:20:44 -0600

gvdhoorn gravatar image

updated 2019-12-05 04:28:08 -0600

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.

edit flag offensive delete link more

Comments

approach quite well.

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

stevemacenski gravatar image stevemacenski  ( 2019-12-05 10:49:39 -0600 )edit

Only about a very tiny architectural aspect of it ;)

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

gvdhoorn gravatar image gvdhoorn  ( 2019-12-05 10:52:24 -0600 )edit

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).

stevemacenski gravatar image stevemacenski  ( 2019-12-05 10:57:50 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-12-05 03:56:27 -0600

Seen: 426 times

Last updated: Dec 05 '19