ModelPrimitive
A primitive representing a 3D model file loaded from an external URL or embedded data
Parent schema
ModelPrimitive appears in the SceneEntity message schema.
Schema
| field | type | description |
|---|---|---|
pose | Pose | Origin of model relative to reference frame |
scale | Vector3 | Scale factor to apply to the model along each axis |
color | Color | Solid color to use for the whole model if override_color is true. |
override_color | boolean | Whether to use the color specified in color instead of any materials embedded in the original model. |
url | string | URL pointing to model file. One of url or data should be non-empty. |
media_type | string | Media type of embedded model (e.g. model/gltf-binary). Required if data is provided instead of url. Overrides the inferred media type if url is provided. |
data | bytes | Embedded model. One of url or data should be non-empty. If data is non-empty, media_type must be set to indicate the type of the data. |
note
When both url and data are provided and the URL fails to load (e.g., network error),
the 3D panel falls back to the embedded data so the model can still be displayed.
Reference implementations
Foxglove messages are framework-agnostic, and can be implemented using any supported message encoding:
| encoding | schema |
|---|---|
| ROS 1 | foxglove_msgs/ModelPrimitive |
| ROS 2 | foxglove_msgs/msg/ModelPrimitive |
| JSON | foxglove.ModelPrimitive |
| Protobuf | foxglove.ModelPrimitive |
| FlatBuffers | foxglove.ModelPrimitive |
| OMG IDL | foxglove::ModelPrimitive |
You must use the schema names specified above for Foxglove to recognize the schema.