The grid as a map
An occupancy grid divides the plane into square cells . A cell is occupied () or free (). Given the measurements and the poses , we want the posterior A grid of cells has possible maps. The posterior is therefore approximated by treating the cells as independent: Each cell is then a binary state that does not change over time, with its own Bayes filter.Log-odds update
The filter stores the log-odds of occupancy, so that the Bayes update is a sum. Each cell covered by the measurement is updated as and the other cells keep their value. is the log-odds of the prior. The middle term is the inverse sensor model, the occupancy probability of the cell given only and . The probability is recovered as . Summing log-odds also avoids the round-off of multiplying probabilities near 0 or 1 (Thrun, Burgard and Fox, 2005, Section 9.2).Inverse sensor model for a range beam
Take a beam with measured range and a cell at distance along it:- : the beam passed through the cell. Add , with .
- : the beam ended in the cell. Add , with .
- : the cell is behind the hit point. No update.
A map from the true path
The robot drives a loop around the room and scans every 0.4 m. Each scan is applied at its true pose.A map from odometry
The odometry poses integrate the motion between consecutive true poses with small random errors and a heading bias of 0.3 degrees per step, as a slightly miscalibrated wheel would produce. The same scans are then mapped at the odometry poses.Limits of independent cells
The independence assumption fails for wide beams. A sonar cone returns one range for a whole sector, and the update marks every cell at that range as occupied, although only one of them produced the echo. Two overlapping cones can then disagree about the same cells. Section 9.4 of Probabilistic Robotics describes mapping with the forward sensor model, which keeps the dependencies between cells at a higher computational cost.References
- Thrun, S., Burgard, W., and Fox, D. (2005). Probabilistic Robotics. MIT Press.
Found an error on this page? Report an issue.

