MyRoboPathOpen Robotics Lab
autonomous slam15 min readUpdated 2026-03-04Intermediate

Adaptive Monte Carlo Localization (AMCL) in ROS 2 Nav2

Localize mobile robots on pre-built 2D maps using particle filters (KLD-sampling), likelihood field beam models, and dynamic particle count adaptation.

MyRoboPath Engineering Lab
Peer-Reviewed Open-Source Hardware & Firmware Guide

Key Engineering Takeaways

  • •AMCL represents robot pose uncertainty as a cloud of weighted particles [x, y, θ].
  • •KLD-sampling reduces particle count when the robot is confident in its position, slashing CPU usage.
  • •AMCL broadcasts the essential `map -> odom` transform to correct for cumulative wheel odometry drift.
Prerequisites
  • • Probability basics
  • • Occupancy grid maps

Probabilistic Particle Filter Theory

Monte Carlo Localization (MCL) uses a recursive Bayes filter where each particle represents a hypothesis of the robot pose. As LiDAR measurements arrive, particles that align with the known map walls receive higher weights, while conflicting particles are eliminated during resampling.

Tags:#AMCL#Particle Filter#Localization#Nav2#Likelihood Field#KLD-Sampling