AI Glossary / Graphs and symbolic AI / Intermediate

Occupancy grid

Definition

An occupancy grid is a spatial map divided into cells, with each cell storing an estimate of whether that part of the environment is occupied. In probabilistic versions, the value expresses belief about occupancy rather than a guaranteed obstacle label. Robots use these maps to combine sensor evidence and support navigation, mapping, and obstacle reasoning.

What it means

A grid turns continuous space into manageable pieces. In two dimensions, the pieces are usually square cells; three-dimensional versions can use volume elements. A cell may have strong evidence of being occupied, strong evidence of being free, or insufficient information to decide confidently.

The map describes occupancy, not necessarily object identity. A group of occupied cells could correspond to a wall, a cabinet, or another object without the grid naming it. Additional representations are needed when the robot must recognize objects, understand their roles, or predict how they will move.

How it works

The system defines a coordinate frame, map extent, and cell resolution. Sensor observations are related to cells using the robot's estimated pose and a sensor model. Evidence updates the occupancy estimates, often through Bayesian calculations or log-odds representations that make repeated updates convenient.

Range observations can provide evidence of free space along a measured ray and occupied space near a detected endpoint, depending on the sensor model. Space beyond the first detected obstacle is not automatically known to be free. Sensor noise, missed detections, and pose uncertainty affect the update.

Many practical formulations simplify dependencies between cells. These approximations make mapping tractable but do not mean that real neighboring cells or repeated measurements are independent. A navigation system must also account for the robot's size and motion, rather than treating a free cell center as proof of collision-free travel.

Three practical examples

  • Indoor navigation: maintain a map of likely walls and open passages from range measurements.
  • Sensor integration: combine observations from different viewpoints while retaining uncertainty about poorly observed regions.
  • Exploration: identify areas where further sensing could reduce uncertainty before choosing a route.

Think of it this way

Think of graph paper shaded according to the evidence that each square contains an obstacle. Dark, light, and uncertain areas guide where more observation or caution is needed.

The analogy is limited because a probabilistic cell value is not simply artistic shading or the fraction of the square covered by an object. Its precise meaning depends on the occupancy event and mapping convention being modeled.

Worked example

Consider a ten-meter by six-meter rectangular map with square cells of side 0.5 meters. It contains 20×12=240 cells. Reducing the cell side to 0.25 meters gives 40×24=960 cells, four times as many for the same two-dimensional area.

For one cell, suppose the prior probability of occupancy is 0.5. A simplified sensor test has P(hit|occupied)=0.8 and P(hit|free)=0.2. After a hit, Bayes' rule gives P(occupied|hit)=0.8×0.5/(0.8×0.5+0.2×0.5)=0.8.

If a second hit is conditionally independent given the cell's unchanged state and uses the same model, the posterior becomes 0.8×0.8/(0.8×0.8+0.2×0.2)=0.64/0.68≈0.9412. The evidence has strengthened the occupancy belief.

The independence and static-cell assumptions are essential. Reprocessing the same measurement twice does not provide two independent observations. Nor should a moving obstacle be treated as permanently fixed without a suitable update policy. This is a hand-calculated single-cell illustration, not a complete range-sensor inverse model or a map-building experiment.

Illustrative case study

Fictional case: a warehouse robot maps an aisle with several temporarily parked carts. Its planner later treats old occupied cells as permanent walls and routes around a passage that has reopened.

The team separates long-lived map structure from more rapidly updated obstacle information and records observation age. It also checks uncertain regions before declaring them traversable. The fictional case illustrates the relationship between mapping assumptions and navigation, not a measured throughput or safety improvement.

Common misconceptions and mistakes

Unknown space is not the same as free space. A region may be unobserved because it is behind an obstacle or outside sensor coverage. The planner's treatment of unknown cells is an explicit policy choice.

An occupancy probability also does not necessarily mean that the stated percentage of a cell's area is physically filled. It commonly represents uncertainty about a binary occupancy state, whose definition depends on the map model.

Finer resolution is not automatically better. It increases storage and computation and may exceed what the sensing and localization accuracy can support. A sharply detailed map can still be wrong if observations are placed using an inaccurate pose.

Business use

Occupancy grids support mobile-robot products where geometric accessibility matters. Important design choices include resolution, update frequency, sensor coverage, persistence of dynamic obstacles, and the distinction between mapping and planning representations.

Evaluate map quality with the intended robot and environment. A route that is open for a point may be too narrow for a loaded vehicle. Coordinate frames, timestamps, footprint handling, and uncertainty should be checked together; an occupancy map is one input to a navigation system rather than a standalone guarantee of successful movement.

People also ask

Does an occupancy grid tell me what an obstacle is?

Usually not by itself. It represents occupancy; object recognition or semantic mapping supplies identity and meaning.

Can a cell have probability 0.5?

Yes. Depending on the prior and evidence, that can represent substantial uncertainty about occupancy.

Why does halving cell width quadruple a two-dimensional map's cell count?

It doubles the number of cells along each of the two dimensions, giving four times as many cells.

Check your understanding

A sensor beam detects an obstacle at three meters. Does that observation alone prove that the space immediately behind the obstacle is free?

Answer: No. The obstacle may hide that region from the sensor, so additional evidence is needed.

Related terms

  • Log-odds
  • Localization
  • Costmap
  • Free space
  • occupancy probability
  • grid map
  • inverse sensor model
  • Bayesian update
  • SLAM

Learn next

trace how one range observation affects cells along a ray. Then compare a probabilistic occupancy map with a navigation costmap that incorporates robot footprint and traversal preferences.

  • Costmap

More in Graphs and symbolic AI

  • NP-completeness - NP-completeness is the complexity-theoretic property of a decision problem that is both efficiently verifiable and at least as hard as every problem in NP...
  • Null move - A null move is a hypothetical move in which a player passes the turn without making an ordinary action on the board.
  • Null-move heuristic - The null-move heuristic is a selective game-search technique that tests a position by hypothetically passing the current player's turn and searching the...
  • Occupied space - Occupied space is the region physically taken up by a robot, obstacle, or other object.
  • Occur check - An occur check, more commonly called an occurs check, tests whether a variable appears inside a term before binding that variable to the term during...
  • Ockham's razor - Ockham's razor, also spelled Occam's razor, is a preference for avoiding unnecessary complexity when choosing among explanations or models.

Sources

Alberto Elfes, “Occupancy Grids: A Stochastic Spatial Representation for Active Robot Perception,” presents the probabilistic representation, sensor evidence, and mapping uses: https://arxiv.org/pdf/1304.1098

The resolution and Bayesian calculations are original teaching examples. Their assumptions are explicit, and the fictional warehouse case is not a report of an actual robot deployment.

Previous: Observer-expectancy effect Next: Occupied space

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer