Skip to main content

TextPrimitive

A primitive representing text labels

Parent Data Structure

TextPrimitive appears in the SceneEntity message data structure.

Data Structure

FieldTypeDescription
poseposePosition of the text box center and orientation of the text. Unit orientation means text flows in the xy-plane, from -x toward +x
billboardbooleanWhether the text should follow pose.orientation (false) or always face the camera (true)
font_sizefloat64Font size (height of a line of text)
scale_invariantbooleanIndicates whether font_size is a fixed size in screen pixels (true), or specified in world coordinates and scales with camera distance (false)
colorcolorText color
textstringText content

Reference Implementation

Visualization data structures are framework-agnostic and can be implemented using any supported message encoding:

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

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