Skip to main content

Grid

A two-dimensional grid of data.

Panel Support

Grid is used in the 3D Panel and Image Panel.

Data Structure

FieldTypeDescription
timestamptimeTimestamp of the grid
frame_idstringReference coordinate system
posePosePosition of the grid origin relative to the reference coordinate system; the grid is positioned in the x-y plane relative to this origin
column_countuint32Number of columns in the grid
cell_sizeVector2Size of a single grid cell along the x and y axes, relative to the pose
row_strideuint32Number of bytes between rows in the data
cell_strideuint32Number of bytes between cells within a row in the data
fieldsPackedElementField[]Fields in the data. red, green, blue, and alpha are optional for customizing the color of the grid
databytesGrid cell data, interpreted using fields, arranged in row-major (y-major) order

Reference Implementation

The visualization data structure is framework-independent and can be implemented using any supported message encoding:

EncodingData Structure
ROS 1foxglove_msgs/Grid
ROS 2foxglove_msgs/msg/Grid
JSONfoxglove.Grid
Protobuffoxglove.Grid
FlatBuffersfoxglove.Grid
OMG IDLfoxglove::Grid

You must use the data structure names specified above for the visualization to recognize the data structure.