Monte Carlo localization figures out where a robot is on a known map by scattering thousands of guesses and letting sensor readings vote the wrong ones away — the particle filter behind almost every indoor mobile robot's "where am I?".
Monte Carlo localization spreads thousands of "maybe I'm here" guesses across the map. Each time the robot senses walls, guesses that match get kept and multiplied; guesses that don't die off. The cloud of survivors converges on the true location.
🎯 Quick challenge
In Monte Carlo localization, each particle represents…
Drop a robot somewhere on a map it already has and ask "where am I?" It can't just measure the answer — but it can guess intelligently. Monte Carlo localization (MCL) turns thousands of guesses into a confident answer.
How it works
MCL is a particle filter. It represents the robot's belief about its pose as a cloud of particles, each a hypothesis "maybe I'm here, facing this way." Each cycle:
Move — when the robot drives, shift every particle by the same motion (plus noise). This is dead reckoning applied to each guess.
Sense & weight — compare what each particle would see (given the map) to what the robot actually sensed. Particles that match get high weight; mismatches get low.
Resample — draw a new set, keeping high-weight particles and dropping poor ones.
The MCL cycle
Over a few cycles the scattered guesses collapse onto the poses that consistently explain the sensor readings — the robot's true location.
Why it's so widely used
MCL handles the global localization and kidnapped robot problems that a single-estimate Kalman filter can't: because it holds many hypotheses at once, it can represent "I might be in either of these two identical hallways" and let evidence decide. It works with cheap lidar or sonar against a simple occupancy grid, degrades gracefully, and is easy to implement — which is why AMCL (Adaptive MCL) is the default localizer in ROS 2's Nav2 and on countless warehouse and service robots.
The trade-offs
More particles mean more accuracy but more compute. Too few and the filter can become overconfident and lose the true pose (particle depletion), especially after a bad motion estimate. Adaptive variants grow and shrink the particle count with uncertainty to balance cost and robustness. And MCL localizes within a known map — building that map first is the job of SLAM.
Why it matters
Monte Carlo localization is how most indoor mobile robots answer "where am I?" — a beautifully intuitive use of random sampling that turns an unsolvable measurement into a solvable vote.