Monte Carlo localization
Our robot’s poses are going outside of the arena, and the distance sensor readings should show which guesses (poses) are more likely than others. The Monte Carlo simulation can improve these guesses, based on the sensor-reading likelihood.
The simulation moves the poses and then observes the state of the sensors to create weights based on their likelihood, a process known as the observation model.
The simulation resamples the guesses by picking them, so those with higher weights are more likely. The result is a new generation of guesses. This movement of particles followed by filtering is why this is also known as a particle filter.
Let’s start by giving our poses weights, based on being inside or outside the arena, and then we’ll look at how to resample from this.
Generating pose weights from a position
The initial weight generation can be based on a simple question – is the robot inside the arena or not? If not...