Skip to main content

ModelPrimitive

Represents the original type of a 3D model file loaded from an external URL or embedded data

Parent Data Structure

ModelPrimitive appears in the SceneEntity message data structure.

Data Structure

FieldTypeDescription
poseposeThe origin of the model relative to the reference frame
scaleVector3The scale factor applied to the model along each axis
colorcolorThe pure color used for the entire model if override_color is true
override_colorbooleanWhether to use the color specified in color instead of any embedded materials in the original model
urlstringThe URL pointing to the model file. Either url or data must be provided.
media_typestringThe media type of the embedded model (e.g. model/gltf-binary). If data is provided instead of url, this field is required. If url is provided, it overrides the inferred media type.
databytesThe embedded model. Either url or data must be provided. If data is provided, media_type must be set to indicate the type of data.

Reference Implementation

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

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

You must use the data structure name specified above so that the visualization can recognize the data structure.