TextPrimitive
A primitive representing text labels
Parent Data Structure
TextPrimitive
appears in the SceneEntity
message data structure.
Data Structure
Field | Type | Description |
---|---|---|
pose | pose | Position of the text box center and orientation of the text. Unit orientation means text flows in the xy-plane, from -x toward +x |
billboard | boolean | Whether the text should follow pose.orientation (false) or always face the camera (true) |
font_size | float64 | Font size (height of a line of text) |
scale_invariant | boolean | Indicates whether font_size is a fixed size in screen pixels (true), or specified in world coordinates and scales with camera distance (false) |
color | color | Text color |
text | string | Text content |
Reference Implementation
Visualization data structures are framework-agnostic and can be implemented using any supported message encoding:
Encoding | Data Structure |
---|---|
ROS 1 | foxglove_msgs/TextPrimitive |
ROS 2 | foxglove_msgs/msg/TextPrimitive |
JSON | foxglove.TextPrimitive |
Protobuf | foxglove.TextPrimitive |
FlatBuffers | foxglove.TextPrimitive |
OMG IDL | foxglove::TextPrimitive |
You must use the data structure names specified above for the visualization to recognize the data structure.