Grid
A two-dimensional grid of data.
Panel Support
Grid
is used in the 3D Panel and Image Panel.
Data Structure
Field | Type | Description |
---|---|---|
timestamp | time | Timestamp of the grid |
frame_id | string | Reference coordinate system |
pose | Pose | Position of the grid origin relative to the reference coordinate system; the grid is positioned in the x-y plane relative to this origin |
column_count | uint32 | Number of columns in the grid |
cell_size | Vector2 | Size of a single grid cell along the x and y axes, relative to the pose |
row_stride | uint32 | Number of bytes between rows in the data |
cell_stride | uint32 | Number of bytes between cells within a row in the data |
fields | PackedElementField[] | Fields in the data. red, green, blue, and alpha are optional for customizing the color of the grid |
data | bytes | Grid 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:
Encoding | Data Structure |
---|---|
ROS 1 | foxglove_msgs/Grid |
ROS 2 | foxglove_msgs/msg/Grid |
JSON | foxglove.Grid |
Protobuf | foxglove.Grid |
FlatBuffers | foxglove.Grid |
OMG IDL | foxglove::Grid |
You must use the data structure names specified above for the visualization to recognize the data structure.