VoxelGrid
A 3D grid of data
Schema
field | type | description |
---|---|---|
timestamp | Timestamp | Timestamp of grid |
frame_id | string | Frame of reference |
pose | Pose | Origin of grid's corner relative to frame of reference |
row_count | uint32 | Number of grid rows |
column_count | uint32 | Number of grid columns |
cell_size | Vector3 | Size of single grid cell along x, y, and z axes, relative to pose |
slice_stride | uint32 | Number of bytes between depth slices in data |
row_stride | uint32 | Number of bytes between rows in data |
cell_stride | uint32 | Number of bytes between cells within a row in data |
fields | PackedElementField[] | Fields in data . red , green , blue , and alpha are optional for customizing the grid's color. |
data | bytes | Grid cell data, interpreted using fields , in depth-major, row-major (Z-Y-X) order. |
data
For the data element starting at byte offset i, the coordinates of its corner closest to the origin will be: z = i / slice_stride * cell_size.z y = (i % slice_stride) / row_stride * cell_size.y x = (i % row_stride) / cell_stride * cell_size.x
Reference implementations
Foxglove schemas are framework-agnostic, and can be implemented using any supported message encoding:
encoding | schema |
---|---|
ROS 1 | foxglove_msgs/VoxelGrid |
ROS 2 | foxglove_msgs/msg/VoxelGrid |
JSON | foxglove.VoxelGrid |
Protobuf | foxglove.VoxelGrid |
FlatBuffers | foxglove.VoxelGrid |
OMG IDL | foxglove::VoxelGrid |
You must use the schema names specified above for Foxglove to recognize the schema.