AMCL

Also known as: Adaptive Monte Carlo localization

On this page 7

AMCL, or Adaptive Monte Carlo localization, is a probabilistic algorithm that estimates the position and heading of a mobile robot on a known two-dimensional map by maintaining a cloud of weighted pose hypotheses called particles. In robotics navigation, it is the most widely deployed method for map-based indoor localization, and it ships as the default localizer in ROS and Nav2.

The word adaptive refers to KLD sampling, a technique that changes the number of particles on the fly: many particles while the robot is uncertain, few once the estimate has converged. This keeps the computational cost low during normal operation without sacrificing the ability to recover from large errors.

How AMCL estimates the robot pose

AMCL implements a recursive Bayes filter in which the probability distribution over robot poses is represented by samples rather than by a formula. Each particle is a candidate pose (x, y, theta) with a weight that expresses how well that pose explains the latest sensor data.

Every update cycle runs three steps. First, the motion model moves each particle according to wheel odometry, adding random noise that reflects how unreliable odometry is. Second, the sensor model compares the current laser scan with what the map predicts from each particle, and weights are updated accordingly. Third, resampling draws a new particle set in proportion to the weights, so unlikely hypotheses disappear and plausible ones multiply.

The following table summarizes the core components of one filter iteration and what each contributes to the final estimate.

ComponentInputRole in the estimate
Motion modelOdometry deltaPredicts where each particle moved, with noise
Sensor modelLaser scan and mapScores how well each particle matches the scan
ResamplingParticle weightsConcentrates particles on likely poses
KLD samplingSpread of particlesSets how many particles to keep
Pose outputWeighted particle clusterPublishes mean pose and covariance
Components of an AMCL update cycle

The published result is the weighted mean of the dominant particle cluster, together with a covariance matrix that downstream planners can use to judge confidence. AMCL also publishes the map-to-odom transform, which corrects the slow drift that pure dead reckoning accumulates.

Sensor models and key parameters in AMCL

Two laser models dominate practice. The likelihood field model precomputes the distance from every map cell to the nearest obstacle and scores each beam endpoint against that field; it is fast and smooth. The beam model simulates ray casting for each beam and explicitly models short readings, maximum-range readings and random noise; it is more faithful but considerably slower.

Tuning AMCL means balancing robustness against computational load. The table lists the parameters that most often decide whether localization is stable, with typical starting values for a differential-drive indoor robot.

ParameterTypical valueWhat it affects
min_particles500Lower bound on cost and on precision after convergence
max_particles2000 to 5000Ability to represent global uncertainty
kld_err0.01 to 0.05Tolerance used by adaptive sampling
update_min_d0.1 to 0.25 mDistance traveled before a filter update
update_min_a0.2 radRotation before a filter update
alpha1 to alpha40.1 to 0.3Expected odometry noise per motion component
laser_max_beams30 to 60Beams used per scan, a speed versus accuracy trade-off
recovery_alpha_slow and recovery_alpha_fast0.001 and 0.1Injection of random particles after failures
Influential AMCL parameters and typical values

The odometry noise parameters are the most frequently mistuned. Values that are too small make the filter overconfident in the wheels, so particles cannot follow real slip; values that are too large spread the cloud and make the pose estimate jittery.

AMCL solves localization on a known map, which separates it from methods that build the map at the same time. Its neighbors in the navigation stack include wheel odometry, which supplies motion input, and the occupancy grid, which supplies the map that the sensor model reads.

The comparison below places AMCL among other common pose estimation techniques used on ground robots.

MethodNeeds prior mapHandles global uncertaintyTypical use
AMCLYes, 2D gridYes, with enough particlesIndoor service and logistics robots
Extended Kalman filterLandmarks or noneNo, single Gaussian onlySensor fusion of IMU and odometry
Scan matchingYes or previous scanNo, needs good initial guessHigh-precision pose refinement
Graph-based SLAMNo, builds itPartly, through loop closureMapping new environments
RTK GPSNoYes, absolute fixOpen outdoor sites
AMCL and alternative pose estimation methods

The decisive advantage of AMCL is its multimodal representation: when a corridor looks identical at two locations, the particle cloud can hold both hypotheses until a distinctive feature resolves the ambiguity. A Kalman filter would have to commit to one of them and could lock onto the wrong one.

Configuring AMCL on a real robot

A reliable deployment starts with a clean, accurate map and a correctly calibrated transform between the laser and the robot base. An error of a few centimeters or one degree in that transform degrades every sensor update and is often mistaken for a tuning problem.

Operators usually supply an initial pose estimate at startup, for example from a known docking station. Global localization from a uniform particle spread is possible but needs many particles and distinctive geometry, so it is treated as a recovery tool rather than the normal start.

The decision table below maps common deployment conditions to configuration choices.

SituationRecommended choiceReason
Long uniform corridorsRaise max_particles, lower alpha valuesAmbiguity needs more hypotheses
Busy areas with peopleLikelihood field with raised z_randUnmapped obstacles cause outlier beams
Slippery floorsRaise odometry alpha valuesWheel slip exceeds default noise
Low-power computerFewer beams, larger update thresholdsReduces CPU load per cycle
Frequent kidnapping riskEnable recovery alphasRandom particles allow re-localization
Configuration decisions for typical environments

Limitations and common failure modes of AMCL

AMCL assumes a static, accurate map, so large changes such as moved shelving, parked pallets or crowds degrade the match between scan and map. In warehouses where layouts shift daily, teams often need periodic remapping or a localizer that tolerates dynamic objects.

  • Particle deprivation: after convergence, no particle may remain near the true pose, so the filter cannot recover without random injection.
  • Symmetric environments: identical rooms or corridors can make the filter converge confidently on the wrong location.
  • Planar assumption: standard AMCL works in 2D and ignores obstacles above or below the laser plane, such as table tops.
  • Overconfident covariance: the reported uncertainty can be smaller than the real error, which misleads safety logic.
  • Long featureless spaces: open halls or glass walls give the laser little to match, so the pose drifts along the axis of the space.

Most of these problems are mitigated by good sensor placement, sensible odometry noise values and monitoring of the particle spread, which gives an early warning before a localization failure becomes a collision or a lost robot.

Understanding it simply

Imagine waking up in a building you know from its floor plan, but with your eyes almost closed. You make many guesses about where you might be. Each time you take a step and glimpse the walls, you drop the guesses that do not fit and keep the ones that do.

AMCL does exactly this for a robot. The guesses are the particles, the glimpses come from a laser scanner, and the steps come from the wheels. After a few meters the guesses cluster in one spot, and that spot is where the robot believes it is. When the robot is sure, it keeps fewer guesses to save effort; when it gets confused, it spreads out new ones.

Applied in practice

A hospital uses autonomous delivery carts to move medication and linens between wards on four floors. Each cart carries a 2D laser scanner with a 12 m range and runs Nav2 with AMCL on a prebuilt occupancy grid of every floor at 5 cm resolution.

When a cart leaves the elevator, the fleet software sends an initial pose near the elevator door, and AMCL converges within about two meters of travel using roughly 600 particles. The long, similar corridors initially caused the carts to confuse two wings, so the engineers raised max_particles to 4000 and reduced the odometry noise values after measuring real wheel slip.

With visitors and beds constantly in the hallways, they also increased the random measurement weight in the likelihood field model. The carts now hold position errors below about 10 cm during normal operation, and the rare localization failures are caught by monitoring the particle covariance and triggering a stop.