Duration
A duration of time, composed of seconds and nanoseconds
Parent schema
Duration appears in the SceneEntity message schema.
Schema
| field | type | description |
|---|---|---|
sec | int32 | The number of seconds in the duration |
nsec | uint32 | The number of nanoseconds in the positive direction |
note
Foxglove's Protobuf schemas represent
duration values with google.protobuf.Duration, which uses seconds and nanos fields.
However, in user scripts,
message converters, and the rest of Foxglove, the values will
appear as sec and nsec fields, for consistency with other data formats.
In Protobuf and FlatBuffers, duration nsec is represented as a signed integer (int32).
Reference implementations
Foxglove schemas are framework-agnostic, and can be implemented using any supported message encoding:
| encoding | schema |
|---|---|
| ROS 1 | std_msgs/Duration |
| ROS 2 | builtin_interfaces/msg/Duration |
| JSON | foxglove.Duration |
| Protobuf | google.protobuf.Duration |
| FlatBuffers | foxglove.Duration |
| OMG IDL | foxglove::Duration |
You must use the schema names specified above for Foxglove to recognize the schema.