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.