---
title: "GridMap"
---
<!-- DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/docs/website.rs -->

A 2D grid map stored as raster data in an image buffer, with a cell size in scene units and pose.

This archetype is intended for robotics applications like occupancy maps or navigation costmaps.

## Fields
### Required
* `data`: [`ImageBuffer`](../components/image_buffer.md)
* `format`: [`ImageFormat`](../components/image_format.md)
* `cell_size`: [`CellSize`](../components/cell_size.md)

### Optional
* `translation`: [`Translation3D`](../components/translation3d.md)
* `rotation_axis_angle`: [`RotationAxisAngle`](../components/rotation_axis_angle.md)
* `quaternion`: [`RotationQuat`](../components/rotation_quat.md)
* `opacity`: [`Opacity`](../components/opacity.md)
* `draw_order`: [`DrawOrder`](../components/draw_order.md)
* `colormap`: [`Colormap`](../components/colormap.md)


## Can be shown in
* [Spatial3DView](../views/spatial3d_view.md)
* [Spatial2DView](../views/spatial2d_view.md)
* [DataframeView](../views/dataframe_view.md)

## API reference links
 * 🌊 [C++ API docs for `GridMap`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1archetypes_1_1GridMap.html)
 * 🐍 [Python API docs for `GridMap`](https://ref.rerun.io/docs/python/stable/common/archetypes#rerun.archetypes.GridMap)
 * 🦀 [Rust API docs for `GridMap`](https://docs.rs/rerun/latest/rerun/archetypes/struct.GridMap.html)

## Examples

### Simple occupancy grid map

snippet: archetypes/grid_map_simple

### Log a grid map at a specific pose

snippet: archetypes/grid_map_pose

<picture data-inline-viewer="snippets/archetypes/grid_map_pose">
  <source media="(max-width: 480px)" srcset="https://static.rerun.io/grid_map_pose/55eeb468043da65a1c678f97048dca8545806983/480w.png">
  <source media="(max-width: 768px)" srcset="https://static.rerun.io/grid_map_pose/55eeb468043da65a1c678f97048dca8545806983/768w.png">
  <source media="(max-width: 1024px)" srcset="https://static.rerun.io/grid_map_pose/55eeb468043da65a1c678f97048dca8545806983/1024w.png">
  <source media="(max-width: 1200px)" srcset="https://static.rerun.io/grid_map_pose/55eeb468043da65a1c678f97048dca8545806983/1200w.png">
  <img src="https://static.rerun.io/grid_map_pose/55eeb468043da65a1c678f97048dca8545806983/full.png">
</picture>

