Skip to content

NavigationMaps and Paths

Occupancy Grids

Cut the floor into cells: cell = floor(position / cell size); each cell is free, occupied or unknown.

Not started Jump to practice

To plan a path, a robot needs a map. The simplest robot map is a grid of squares on graph paper.

Key idea

An occupancy grid cuts the floor into square cells of size $s$. A point at $x$ falls in column $\lfloor x / s \rfloor$ (round down, counting from 0). Each cell is marked free, occupied or unknown, often as a probability.
A grid map. Click cells to add or remove walls.

Why it works

A grid turns the world into something a computer can search. Smaller cells give a more exact map but more cells: halving the size makes four times as many, which takes more memory and more search time.

Worked example: Which cell?

Cells 0.25 m wide. A point at $x = 1.6$ m.
  1. $1.6 / 0.25 = 6.4$.
  2. Round down: column 6.

Answer: Column 6.

Worked example: How big?

A 5 m Γ— 4 m room, 0.1 m cells.
  1. $50 \times 40 = 2000$ cells.

Answer: 2,000 cells.

Common mistake

Rounding to the nearest cell instead of down, or counting cells from 1.

Practice

Pass with 3 right answers, the last 2 in a row. Each right answer earns 2 XP.

Loading practice…

Builds on

Leads to

Sources and further reading

  • Sebastian Thrun, Wolfram Burgard and Dieter Fox, Probabilistic Robotics (MIT Press, 2005)
  • Roland Siegwart, Illah R. Nourbakhsh and Davide Scaramuzza, Introduction to Autonomous Mobile Robots, 2nd ed. (MIT Press, 2011)