LinePrimitive
A primitive representing a series of points connected by lines
Parent Data Structure
LinePrimitive appears in the SceneEntity message data structure.
Data Structure
| Field | Type | Description |
|---|---|---|
| type | LineType | Drawing primitive used for the lines |
| pose | Pose | Origin of the lines relative to the reference frame |
| thickness | float64 | Thickness of the lines |
| scale_invariant | boolean | Indicates whether thickness is fixed size in screen pixels (true) or specified in world coordinates and scales with camera distance (false) |
| points | Point3[] | Points on the lines |
| color | Color | Solid color for the entire line. Either color or colors must be provided. |
| colors | Color[] | Color for each point (if specified, length must match points). Either color or colors must be provided. |
| indices | uint32[] | Indices into the points and colors attribute arrays, which can be used to avoid duplicating attribute data. |
indices
If omitted or empty, no indices are used. This default behavior is equivalent to specifying [0, 1, ..., N-1] for indices (where N is the number of points provided).
Reference Implementation
The visualization schema is framework-independent and can be implemented using any supported message encoding:
| Encoding | Data Structure |
|---|---|
| ROS 1 | foxglove_msgs/LinePrimitive |
| ROS 2 | foxglove_msgs/msg/LinePrimitive |
| JSON | foxglove.LinePrimitive |
| Protobuf | foxglove.LinePrimitive |
| FlatBuffers | foxglove.LinePrimitive |
| OMG IDL | foxglove::LinePrimitive |
You must use the data structure names specified above for the visualization to recognize the data structure.