roboto.domain.topics
Submodules
Package Contents
AddMessagePathRepresentationRequest
Bases: BaseAddRepresentationRequest
Request to associate a message path with a representation.
Creates a link between a specific message path and a data representation, enabling efficient access to individual fields within topic data.
Parameters
data AnyAddMessagePathRequest
Bases: pydantic.BaseModel
Request to add a new message path to a topic.
Defines a new message path within a topic’s schema, specifying its data type, canonical type, and initial metadata. Used during topic creation or when extending an existing topic’s schema.
Parameters
data AnyAttributes
AddMessagePathRequest.canonical_data_type
Normalized Roboto data type that enables specialized platform features for maps, images, timestamps, and other data.
AddMessagePathRequest.data_type
Native data type as it appears in the original data source (e.g., “float32”, “geometry_msgs/Pose”). Used for display purposes.
AddMessagePathRequest.message_path
Dot-delimited path to the attribute (e.g., “pose.position.x”).
AddMessagePathRequest.metadata
Initial key-value pairs to associate with the message path.
AddMessagePathRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
AddMessagePathRequest.path_in_schema
List of path components representing the field’s location in the original data schema. Unlike message_path, which assumes dots separate path parts implying nested data, this preserves the exact path from the source data for accurate attribute access.
CanonicalDataType
Bases: enum.Enum
Normalized data types used across different robotics frameworks.
Well-known and simplified data types that provide a common vocabulary for describing message path data types across different frameworks and technologies. These canonical types are primarily used for UI rendering decisions and cross-platform compatibility.
The canonical types abstract away framework-specific details while preserving the essential characteristics needed for data processing and visualization.
References
- ROS 1 field types: http://wiki.ros.org/msg
- ROS 2 field types: https://docs.ros.org/en/iron/Concepts/Basic/About-Interfaces.html#field-types
- uORB: https://docs.px4.io/main/en/middleware/uorb.html#adding-a-new-topic
Example mappings:
float32->CanonicalDataType.Numberuint8[]->CanonicalDataType.Arraysensor_msgs/Image->CanonicalDataType.Imagegeometry_msgs/Pose->CanonicalDataType.Objectstd_msgs/Header->CanonicalDataType.Objectstring->CanonicalDataType.Stringchar->CanonicalDataType.Stringbool->CanonicalDataType.Booleanbyte->CanonicalDataType.Byte
Attributes
CanonicalDataType.Boolean
CanonicalDataType.Byte
CanonicalDataType.Categorical
Data that can take a limited, fixed set of values. To be interpreted correctly by Roboto clients, a MessagePathRecord with this type must have a "categories" metadata key on the MessagePathRecord, which must be the ordered list of values that the Categorical can take.
For example, a signal that is logged as either “off” or “on” could be represented as a Categorical with the metadata "categories"=["off", "on"]. This allows Roboto to map the value “off” to 0 and “on” to 1 –each corresponding to their index position in the metadata array– and therefore visualize these state transitions as a plot.
The default visual representation of Categorical data will be the same as String data, but the Roboto visualizer will be capable of rendering Categorical data in a plot.
CanonicalDataType.Image
Special purpose type for data that can be rendered as an image.
CanonicalDataType.LatDegFloat
Geographic point in degrees. E.g. 47.6749387 (used in ULog ver_data_format >= 2)
CanonicalDataType.LatDegInt
Geographic point in degrees, expressed as an integer. E.g. 317534036 (used in ULog ver_data_format < 2)
CanonicalDataType.LonDegFloat
Geographic point in degrees. E.g. 9.1445274 (used in ULog ver_data_format >= 2)
CanonicalDataType.LonDegInt
Geographic point in degrees, expressed as an integer. E.g. 1199146398 (used in ULog ver_data_format < 2)
CanonicalDataType.Number
CanonicalDataType.NumberArray
CanonicalDataType.String
CanonicalDataType.Timestamp
Time elapsed since the Unix epoch, identifying a single instant on the time-line. Roboto clients will look for a "unit" metadata key on the MessagePath record, and will assume “ns” if none is found. If the timestamp is in a different unit, add the following metadata to the MessagePath record: { "unit": "s"|"ms"|"us"|"ns" } The unit must be a known value from TimeUnit.
CreateTopicRequest
Bases: pydantic.BaseModel
Request to create a new topic in the Roboto platform.
Contains all the information needed to register a topic found within a source recording file, including its schema, temporal boundaries, and initial message paths.
Parameters
data AnyAttributes
CreateTopicRequest.association
CreateTopicRequest.end_time
CreateTopicRequest.message_count
CreateTopicRequest.message_paths
CreateTopicRequest.metadata
CreateTopicRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
CreateTopicRequest.schema_checksum
CreateTopicRequest.schema_name
CreateTopicRequest.start_time
CreateTopicRequest.topic_name
DeleteMessagePathRequest
Bases: pydantic.BaseModel
Request to delete a message path from a topic.
Removes a message path from a topic’s schema. This operation cannot be undone and will remove all associated data and metadata for the specified path.
Parameters
data AnyMessagePath
Represents a message path within a topic in the Roboto platform.
A message path defines a specific field or signal within a topic’s data schema, using dot notation to specify nested attributes. Message paths enable fine-grained access to individual data elements within time-series robotics data, supporting operations like statistical analysis, data filtering, and visualization.
Each message path has an associated data type (both native and canonical), metadata, and statistical information computed from the underlying data. Message paths are the fundamental building blocks for data analysis in Roboto, allowing users to work with specific signals or measurements from complex robotics data structures.
Message paths support temporal filtering, data export to various formats including pandas DataFrames, and integration with the broader Roboto analytics ecosystem. They provide efficient access to time-series data while maintaining the semantic structure of the original robotics messages.
The MessagePath class serves as the primary interface for accessing individual data signals within topics, providing methods for data retrieval, statistical analysis, and metadata management.
Parameters
roboto_client Optional[roboto.topic_data_service Optional[roboto.Attributes
MessagePath.DELIMITER
Properties
MessagePath.canonical_data_type
Canonical Roboto data type corresponding to the native data type.
MessagePath.count
Number of data points available for this message path.
MessagePath.created
Timestamp when this message path was created.
MessagePath.created_by
Identifier of the user or system that created this message path.
MessagePath.data_type
Native data type for this message path, e.g. ‘float32’
MessagePath.from_id()
Retrieve a message path by its unique identifier.
Fetches a message path record from the Roboto platform using its unique ID. This is useful when you have a message path identifier from another operation.
Parameters
message_path_id strUnique identifier for the message path.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
topic_data_service Optional[roboto.Service for accessing topic data. If None, creates a default instance.
Returns
MessagePath instance representing the requested message path.
Raises
Message path with the given ID does not exist.
Caller lacks permission to access the message path.
Usage
message_path = MessagePath.from_id("mp_abc123")
print(message_path.path)
# 'angular_velocity.x'
print(message_path.canonical_data_type)
# CanonicalDataType.NumberMessagePath.get_data()
Return data for this specific message path.
Retrieves and yields data records containing only the values for this message path, with optional temporal filtering. This provides a focused view of a single signal or field within the broader topic data.
Parameters
start_time Optional[roboto.Start time (inclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
end_time Optional[roboto.End time (exclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
cache_dir Union[str, pathlib.Directory where topic data will be downloaded if necessary. Defaults to DEFAULT_CACHE_DIR.
Yields
Dictionary records containing the log_time and the value for this message path.
Return type
Notes
For each example below, assume the following is a sample datum record that can be found in this message path’s associated topic:
{
"angular_velocity": {
"x": <uint32>,
"y": <uint32>,
"z": <uint32>
},
"orientation": {
"x": <uint32>,
"y": <uint32>,
"z": <uint32>,
"w": <uint32>
}
}Usage
Print all data for a specific message path:
topic = Topic.from_name_and_file("/imu/data", "file_abc123")
angular_velocity_x = topic.get_message_path("angular_velocity.x")
for record in angular_velocity_x.get_data():
print(f"Time: {record['log_time']}, Value: {record['angular_velocity']['x']}")Get data within a time range:
for record in angular_velocity_x.get_data(start_time=1722870127699468923, end_time=1722870127799468923):
print(record)Collect data into a dataframe (requires installing the roboto[analytics] extra):
df = angular_velocity_x.get_data_as_df()
import math
assert math.isclose(angular_velocity_x.mean, df[angular_velocity_x.path].mean())MessagePath.get_data_as_df()
Return this message path’s data as a pandas DataFrame.
Retrieves message path data and converts it to a pandas DataFrame for analysis and visualization. The DataFrame is indexed by log time and contains a column for this message path’s values.
Parameters
start_time Optional[roboto.Start time (inclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
end_time Optional[roboto.End time (exclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
cache_dir Union[str, pathlib.Directory where topic data will be downloaded if necessary. Defaults to DEFAULT_CACHE_DIR.
Returns
pandas DataFrame containing the message path data, indexed by log time.
Raises
ImportErrorpandas is not installed. Install with roboto[analytics] extra.
Notes
Requires installing this package using the roboto[analytics] extra.
Usage
topic = Topic.from_name_and_file("/imu/data", "file_abc123")
angular_velocity_x = topic.get_message_path("angular_velocity.x")
df = angular_velocity_x.get_data_as_df()
print(df.head())
# angular_velocity.x
# log_time
# 1722870127699468923 0.1
# 1722870127699468924 0.15
print(f"Mean: {df[angular_velocity_x.path].mean()}")
# Mean: 0.125Properties
MessagePath.max
Maximum value observed for this message path.
MessagePath.mean
Mean (average) value for this message path.
MessagePath.median
Median value for this message path.
MessagePath.message_path_id
Unique identifier for this message path.
MessagePath.metadata
Metadata dictionary associated with this message path.
MessagePath.min
Minimum value observed for this message path.
MessagePath.modified
Timestamp when this message path was last modified.
MessagePath.modified_by
Identifier of the user or system that last modified this message path.
MessagePath.p25
25th percentile of the values observed for this message path.
MessagePath.p75
75th percentile of the values observed for this message path.
MessagePath.p95
95th percentile of the values observed for this message path.
MessagePath.p99
99th percentile of the values observed for this message path.
MessagePath.parents()
Get parent paths for a message path.
Given a path_in_schema (list of path components), returns a list of its parent paths ordered from most specific to least specific.
Parameters
path_in_schema list[str]List of path components (e.g., [“pose”, “pose”, “position”, “x”]).
Returns
List of parent paths in dot notation, ordered from most to least specific.
Raises
TypeErrorIf a string is passed instead of a list. This method previously accepted a dot-delimited string; passing a string now would silently iterate over its characters and produce wrong results.
Usage
path_in_schema = ["pose", "pose", "position", "x"]
MessagePath.parents(path_in_schema)
# ['pose.pose.position', 'pose.pose', 'pose']# Single level path has no parents
MessagePath.parents(["velocity"])
# []Properties
MessagePath.path
Dot-delimited path to the attribute (e.g., ‘pose.position.x’).
MessagePath.record
Underlying MessagePathRecord for this message path.
MessagePath.stddev
Standard deviation of the values observed for this message path.
MessagePath.to_association()
Convert this message path to an Association object.
Creates an Association object that can be used to reference this message path in other parts of the Roboto platform.
Returns
Association object representing this message path.
Usage
message_path = MessagePath.from_id("mp_abc123")
association = message_path.to_association()
print(association.association_type)
# AssociationType.MessagePath
print(association.association_id)
# mp_abc123Properties
MessagePath.topic_id
Unique identifier of the topic containing this message path.
MessagePathChangeset
Bases: pydantic.BaseModel
Changeset for batch operations on topic message paths.
Defines a collection of add, delete, and update operations to be applied to a topic’s message paths in a single atomic operation. Useful for making multiple schema changes efficiently.
Parameters
data AnyMessagePathChangeset.check_replace_all_correctness()
Return type
MessagePathChangeset.from_replacement_message_paths()
Create a changeset that replaces all existing message paths.
Creates a changeset that will replace all existing message paths on a topic with the provided set of message paths. This is useful for completely redefining a topic’s schema.
Parameters
message_paths collections.Sequence of message path requests to replace existing paths.
Returns
MessagePathChangeset configured to replace all existing message paths.
Usage
from roboto.domain.topics import AddMessagePathRequest, CanonicalDataType
new_paths = [
AddMessagePathRequest(
message_path="velocity.x", data_type="float32", canonical_data_type=CanonicalDataType.Number
)
]
changeset = MessagePathChangeset.from_replacement_message_paths(new_paths)MessagePathChangeset.has_changes()
Check whether the changeset contains any actual changes.
Returns
True if the changeset contains operations that would modify the topic’s message paths.
Attributes
MessagePathChangeset.message_paths_to_add
Message paths to add to a topic.
MessagePathChangeset.message_paths_to_delete
Message paths to delete from a topic.
MessagePathChangeset.message_paths_to_update
Message paths to update on a topic.
MessagePathChangeset.replace_all
Flag indicating whether this changeset should replace all message paths on a topic.
It assumes that the replacement message paths will be provided via message_paths_to_add. Rather than setting this flag directly, use appropriate class methods such as from_replacement_message_paths.
MessagePathMetadataWellKnown
Bases: roboto.compat.StrEnum
Well-known metadata key names (with well-known semantics) that may be set in metadata.
These are most often set by Roboto’s first-party ingestion actions and used by Roboto clients.
Attributes
MessagePathMetadataWellKnown.Categories
An ordered list of values that a Categorical can take.
Usage
"categories"=["off", "on"]"categories"=["left", "up", "right", "down"]
MessagePathMetadataWellKnown.ColumnName
The original name or path to this field in the source data schema. May differ from message_path if character substitutions were applied to conform to naming requirements.
Notes
- Use of this metadata field is soft-deprecated as of SDK v0.24.0.
- Prefer use of
source_pathandpath_in_schemainstead. Those attributes are now first-class fields onMessagePathRecordand can be specified viaAddMessagePathRequest.
MessagePathRecord
Bases: pydantic.BaseModel
Record representing a message path within a topic.
Defines a specific field or signal within a topic’s data schema, including its data type, metadata, and statistical information. Message paths use dot notation to specify nested attributes within complex message structures.
Message paths are the fundamental units for accessing individual data elements within time-series robotics data, enabling fine-grained analysis and visualization of specific signals or measurements.
Parameters
data AnyAttributes
MessagePathRecord.canonical_data_type
Normalized data type, used primarily internally by the Roboto Platform.
MessagePathRecord.created
MessagePathRecord.created_by
MessagePathRecord.data_type
‘Native’/framework-specific data type of the attribute at this path. E.g. “float32”, “uint8[]”, “geometry_msgs/Pose”, “string”.
MessagePathRecord.message_path
Dot-delimited path to the attribute within the datum record.
MessagePathRecord.message_path_id
MessagePathRecord.metadata
Key-value pairs to associate with this metadata for discovery and search, e.g. { ‘min’: ‘0.71’, ‘max’: ’1.77 }
MessagePathRecord.modified
MessagePathRecord.modified_by
MessagePathRecord.org_id
This message path’s organization ID, which is the organization ID of the containing topic.
MessagePathRecord.parents()
Logical message path ancestors of this path.
Usage
Given a deeply nested field root.sub_obj_1.sub_obj_2.leaf_field:
field = "root.sub_obj_1.sub_obj_2.leaf_field"
record = MessagePathRecord(message_path=field) # other fields omitted for brevity
print(record.parents())
# ['root.sub_obj_1.sub_obj_2', 'root.sub_obj_1', 'root']Parameters
delimiter strReturn type
Attributes
MessagePathRecord.path_in_schema
List of path components representing the field’s location in the original data schema. Unlike message_path, which must conform to Roboto-specific naming requirements and assumes dots separated path parts imply nested data, this preserves the exact path from the source data for accurate attribute access. This is expected to be the split representation of source_path.
MessagePathRecord.representations
Zero to many Representations of this MessagePath.
MessagePathRecord.source_path
The original name of this field in the source data schema. May differ from message_path if character substitutions were applied to conform to naming requirements.
This is the preferred field to use when specifying message_path_include or message_path_exclude to the get_data or get_data_as_df methods of Topic and Event.
MessagePathRecord.to_field_selection()
Translate this record into the FieldSelection the format decoders accept.
Return type
Attributes
MessagePathRecord.topic_id
MessagePathRepresentationMapping
Bases: pydantic.BaseModel
Mapping between message paths and their data representation.
Associates a set of message paths with a specific representation that contains their data. This mapping is used to efficiently locate and access data for specific message paths within topic representations.
Parameters
data AnyAttributes
MessagePathRepresentationMapping.message_paths
MessagePathRepresentationMapping.representation
MessagePathStatistic
Bases: enum.Enum
Statistics computed by Roboto in our standard ingestion actions.
Which of these a given message path actually carries depends on the ingestion path that produced it, so treat every one as optional: read them with metadata.get(...) or through the corresponding MessagePath property, both of which yield None when the statistic was never written, and never assume a missing value means zero. Indexing metadata directly raises KeyError for a statistic that was never written.
Attributes
MessagePathStatistic.Count
MessagePathStatistic.Max
MessagePathStatistic.Mean
MessagePathStatistic.Median
MessagePathStatistic.Min
MessagePathStatistic.P25
MessagePathStatistic.P75
MessagePathStatistic.P95
MessagePathStatistic.P99
MessagePathStatistic.Stddev
RepresentationRecord
Bases: pydantic.BaseModel
Record representing a data representation for topic content.
A representation is a pointer to processed topic data stored in a specific format and location. Representations enable efficient access to topic data by providing multiple storage formats optimized for different use cases.
Most message paths within a topic point to the same representation (e.g., an MCAP or Parquet file containing all topic data). However, some message paths may have multiple representations for analytics or preview formats.
Representations are versioned and associated with specific files or storage locations through the association field.
Parameters
data AnyAttributes
RepresentationRecord.association
Identifier and entity type with which this Representation is associated. E.g., a file, a database.
RepresentationRecord.created
RepresentationRecord.format
Content format descriptor for this representation. For image topics: the image encoding (e.g. “jpeg”, “png”) for simplified representations, or the ROS schema name (e.g. “sensor_msgs/Image”) for original/passthrough representations. None for non-image topics or legacy representations.
RepresentationRecord.modified
RepresentationRecord.representation_id
RepresentationRecord.storage_format
RepresentationRecord.topic_id
RepresentationRecord.transformations
Ordered list of transformation descriptors applied to produce this representation. Empty for original/passthrough representations.
Each entry is a "<kind>:<param>" string where <kind> is a TransformationKind member. Construct entries via TransformationKind.with_param() and parse them via TransformationKind.parse() to keep the vocabulary centralized.
Example: ["downsample:0.5", "encode:jpeg"]
RepresentationRecord.version
RepresentationSelector
Bases: pydantic.BaseModel
Criteria for selecting among multiple representations of the same data.
When a message path has multiple representations (e.g., both raw sensor data and a processed JPEG encoding), this is a hard filter: only matching representations qualify, and message paths with no matching representation are dropped from selection results — callers must handle empty or partial output.
Legacy carve-out for ``content_format``: representations with no format set (i.e., predating the field) are treated as matching any content_format request. This keeps older data accessible. When both an explicit format match and a legacy representation are available for the same message path, the explicit match wins.
Instances are immutable (frozen=True) so they can be safely shared — including as default arguments to methods like Topic.get_data().
Parameters
data AnyAttributes
RepresentationSelector.content_format
If set, only representations whose format field matches this value qualify (e.g., "jpeg"). Representations with no format also qualify under the legacy carve-out. None means no constraint.
RepresentationSelector.matches()
Check whether a representation satisfies this selector’s criteria.
A representation matches when each non-None selector field is satisfied. For content_format, representations with no format set are treated as matching (legacy carve-out — see class docstring).
Parameters
representation RepresentationRecordReturn type
Attributes
RepresentationSelector.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
RepresentationSelector.raw()
Select representations with no transformations applied (original data).
Return type
RepresentationSelector.select_representations()
Select one representation per message path that matches this selector.
When the API returns multiple representations for the same message paths (e.g., both a raw MCAP and a processed JPEG MCAP for an image topic), this method picks a matching representation for each path and deduplicates so each message path appears in exactly one mapping.
Non-matching representations are excluded. When both an explicit format match and a legacy representation (no format set) cover the same message path, the explicit match wins. Message paths covered by no matching representation are dropped — callers must handle empty or partial results.
Parameters
mappings list[MessagePathRepresentationMapping]All representation mappings, potentially with overlapping message paths.
Returns
Deduplicated mappings of message paths to matching representations. Empty if no representation matches.
Attributes
RepresentationSelector.transformations
If set, only representations whose transformations field matches exactly qualify. [] matches representations with no transformations (i.e., raw/original data). None means no constraint.
RepresentationStorageFormat
Bases: enum.Enum
Supported storage formats for topic data representations.
Defines the available formats for storing and accessing topic data within the Roboto platform. Each format has different characteristics and use cases.
SchemaFieldRecord
Bases: pydantic.BaseModel
A single field within a topic schema.
One entry per unique field path within a schema; field paths are deduplicated across topics that share the schema.
Parameters
data AnyAttributes
SchemaFieldRecord.canonical_data_type
Normalized data type used for cross-framework compatibility and UI rendering decisions.
SchemaFieldRecord.created
SchemaFieldRecord.created_by
SchemaFieldRecord.data_type
Native, framework-specific data type of the field. E.g. “float32”, “uint8[]”, “geometry_msgs/Pose”.
SchemaFieldRecord.field_id
SchemaFieldRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
SchemaFieldRecord.modified
SchemaFieldRecord.modified_by
SchemaFieldRecord.name
Human-readable display name of the field (typically the final component of path_in_schema).
SchemaFieldRecord.org_id
SchemaFieldRecord.path_in_schema
Path components locating this field in the source data schema. Each component is a schema-native attribute name, in order from the schema root to the leaf.
SchemaFieldRecord.schema_id
SchemaFieldRecord.unit
Optional unit of the field’s values (e.g., "ns", "m/s"). None if the field is unitless or unknown.
SetDefaultRepresentationRequest
Bases: BaseAddRepresentationRequest
Request to set the default representation for a topic.
Designates a specific representation as the default for accessing topic data. The default representation is used when no specific representation is requested for data access operations.
Parameters
data AnyAttributes
SetDefaultRepresentationRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
SetTimelineOffsetsRequest
Bases: pydantic.BaseModel
Request body for POST /v1/files/id/<id>/timeline-offsets.
Atomic request: the server applies all entries together or fails.
Parameters
data AnyAttributes
SetTimelineOffsetsRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
SetTimelineOffsetsRequest.offsets
Offsets to apply, at least one. An entry whose selectors reach no extent on this file is skipped as long as another entry reaches one; a request whose entries together reach none is refused. When two entries reach the same extent, the later entry’s offset applies.
TimelineExtentRecord
Bases: pydantic.BaseModel
Min/max timestamp bounds for one topic partition measured against one timeline source.
Written by ingest when a partition’s timestamps are summarized for a given source (e.g., a schema timestamp field, or message log/publish time).
Stored timestamps come through verbatim from the data source: they may be absolute nanoseconds since the Unix epoch, or partition-relative (e.g., monotonic from zero). unix_epoch_offset_ns is the calibration that projects stored values onto Unix-epoch wall-clock: session_time_ns = stored_time_ns + unix_epoch_offset_ns. A value of 0 means the stored timestamps are already absolute Unix-epoch ns, or that no calibration has been applied yet.
Parameters
data AnyAttributes
TimelineExtentRecord.created
TimelineExtentRecord.created_by
TimelineExtentRecord.max_timestamp
Largest stored timestamp in this extent, in nanoseconds. Absolute or partition-relative per the source.
TimelineExtentRecord.min_timestamp
Smallest stored timestamp in this extent, in nanoseconds. Absolute or partition-relative per the source.
TimelineExtentRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TimelineExtentRecord.modified
TimelineExtentRecord.modified_by
TimelineExtentRecord.org_id
TimelineExtentRecord.timeline_extent_id
TimelineExtentRecord.timeline_source_id
ID of the timeline source these bounds are measured against.
TimelineExtentRecord.topic_part_id
ID of the topic partition these bounds apply to.
TimelineExtentRecord.unix_epoch_offset_ns
Nanoseconds to add to each stored timestamp to obtain Unix-epoch wall-clock time: session_time_ns = stored_time_ns + unix_epoch_offset_ns. 0 when stored timestamps are already absolute Unix-epoch ns, or when no calibration has been recorded for this partition/source pair.
TimelineOffsetEntry
Bases: pydantic.BaseModel
One offset for set_timeline_offsets().
Optional selectors narrow which of the file’s timelines the offset applies to.
Topic selector:
topic_name: the topic’s name (e.g."/imu/raw"); topic names are unique within a single file. Scopes the offset to a single topic on the file.
Timeline-source selector (give at most one):
timeline_source_name: the source’s name (e.g."header.stamp"). Source names are not unique, so the offset applies to every source with that name within the topic selector’s scope.timeline_source_id: explicit id, for callers holding aTimelineSourceRecord.
Omitting every selector applies the offset to every timeline on the file.
Parameters
data AnyAttributes
TimelineOffsetEntry.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TimelineOffsetEntry.timeline_source_id
TimelineOffsetEntry.timeline_source_name
TimelineOffsetEntry.topic_name
TimelineOffsetEntry.unix_epoch_offset_ns
Nanoseconds added to the file’s stored timestamps so they read as Unix-epoch time (session_time_ns = stored_time_ns + unix_epoch_offset_ns). Must not be negative, and must fit in the signed 64-bit integer the platform stores it in. Also accepts any roboto.time.Time at runtime, read as roboto.time.to_epoch_nanoseconds() reads it, so an instant such as a datetime becomes the nanoseconds since the Unix epoch at which stored time 0 occurred; convert with that function first to satisfy a type checker.
TimelineSourceKind
Discriminator for how a TimelineSourceRecord derives its timestamps.
"schema_field" points at a timestamp field inside the schema (field_id is set). "message_log_time" and "message_publish_time" point at the message envelope’s log or publish timestamp respectively (field_id is None).
TimelineSourceRecord
Bases: pydantic.BaseModel
A registered timeline source for a schema.
A timeline source either points at a timestamp field inside the schema (source="schema_field", field_id set) or at the message envelope’s log or publish timestamp (source in {"message_log_time", "message_publish_time"}, field_id is None). Timeline sources are scoped to a schema, not a topic, so topics that share a schema share their timeline sources.
Parameters
data AnyAttributes
TimelineSourceRecord.created
TimelineSourceRecord.created_by
TimelineSourceRecord.field_id
ID of the schema field supplying timestamps. Set when source == "schema_field"; otherwise None.
TimelineSourceRecord.is_default
Whether this timeline source is the default for its schema when no source is specified explicitly.
TimelineSourceRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TimelineSourceRecord.modified
TimelineSourceRecord.modified_by
TimelineSourceRecord.org_id
TimelineSourceRecord.schema_id
ID of the schema this timeline source is registered against.
TimelineSourceRecord.source
Where timestamps come from: a schema field ("schema_field"), or the message envelope’s log or publish timestamp ("message_log_time" / "message_publish_time").
TimelineSourceRecord.timeline_source_id
TimelineSourceUpdate
Bases: pydantic.BaseModel
Partial update for a timeline source.
Fields left at NotSet are not modified.
Parameters
data AnyAttributes
TimelineSourceUpdate.is_default
TimelineSourceUpdate.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TimelineSourceUpdate.name
Timestamp
Topic
Represents a topic within the Roboto platform.
A topic is a sequence of structured time-series data linked to a source file, typically containing sensor readings, robot state information, or other timestamped data streams. Topics are fundamental building blocks for data analysis in robotics, providing organized access to time-synchronized data from various sources like ROS bags, MCAP files, or other structured data formats.
Each topic follows a defined schema where message paths represent the individual fields or signals within that schema. Topics enable efficient querying, filtering, and analysis of time-series data, supporting operations like temporal slicing, field selection, and data export to various formats including pandas DataFrames.
Topics are associated with files and inherit access permissions from their parent dataset. They provide the primary interface for accessing ingested robotics data in the Roboto platform, supporting both programmatic access through the SDK and visualization in the web interface.
The Topic class serves as the main interface for topic operations in the Roboto SDK, providing methods for data retrieval, message path management, metadata operations, and schema management.
Parameters
roboto_client Optional[roboto.topic_data_service Optional[roboto.Topic.add_message_path()
Add a new message path to this topic.
Creates a new message path within this topic, defining a specific field or signal that can be extracted from the topic’s data. Message paths use dot notation to specify nested attributes within the topic’s schema.
Parameters
message_path strDot-delimited path to the attribute (e.g., “pose.position.x”).
data_type strNative data type of the attribute as it appears in the original data source (e.g., “float32”, “uint8[]”, “geometry_msgs/Pose”). Used primarily for display purposes and should match the robot’s runtime language or schema definitions.
canonical_data_type roboto.Normalized Roboto data type that enables specialized platform features for maps, images, timestamps, and other data with special interpretations.
path_in_schema Optional[list[str]]List of path components representing the field’s location in the source data schema. Unlike message_path, which assumes dots separate path parts implying nested data, this preserves the exact path from the source data for accurate attribute access.
metadata Optional[dict[str, Any]]Additional metadata to associate with the message path.
Returns
MessagePathRecord representing the newly created message path.
Raises
Message path already exists for this topic.
Caller lacks permission to modify the topic.
Usage
from roboto.domain.topics import CanonicalDataType
topic = Topic.from_id("topic_xyz789")
message_path = topic.add_message_path(
message_path="pose.position.x",
data_type="float64",
canonical_data_type=CanonicalDataType.Number,
metadata={"unit": "meters"},
)
print(message_path.message_path)
# pose.position.xTopic.add_message_path_representation()
Add a representation for a specific message path.
Associates a message path with a data representation, enabling efficient access to specific fields within the topic data. Representations can be in different storage formats like MCAP or Parquet.
Parameters
message_path_id strUnique identifier of the message path.
association roboto.Association pointing to the representation data.
storage_format roboto.Format of the representation data.
version intVersion number of the representation.
format Optional[str]Content format descriptor (e.g. “jpeg”, “sensor_msgs/Image”).
transformations Optional[list[str]]Transformation descriptors applied (e.g. [“downsample:0.5”]).
Returns
RepresentationRecord representing the newly created representation.
Raises
Message path with the given ID does not exist.
Caller lacks permission to modify the topic.
Usage
from roboto.association import Association
from roboto.domain.topics import RepresentationStorageFormat
topic = Topic.from_id("topic_xyz789")
representation = topic.add_message_path_representation(
message_path_id="mp_123",
association=Association.file("file_repr_456"),
storage_format=RepresentationStorageFormat.MCAP,
version=1,
)
print(representation.representation_id)
# repr_789Properties
Topic.association
Association linking this topic to its source entity (typically a file).
Topic.create()
Create a new topic associated with a file.
Creates a new topic record in the Roboto platform, associating it with the specified file and defining its schema and temporal boundaries. This method is typically used during data ingestion to register topics found in robotics data files.
Parameters
file_id strUnique identifier of the file this topic is associated with.
topic_name strName of the topic (e.g., “/camera/image”, “/imu/data”).
end_time Optional[int]End time of the topic data in nanoseconds since UNIX epoch.
message_count Optional[int]Total number of messages in this topic.
metadata Optional[collections.Additional metadata to associate with the topic.
schema_checksum Optional[str]Checksum of the topic’s message schema for validation.
schema_name Optional[str]Name of the message schema (e.g., “sensor_msgs/Image”).
start_time Optional[int]Start time of the topic data in nanoseconds since UNIX epoch.
message_paths Optional[collections.Message paths to create along with the topic.
caller_org_id Optional[str]Organization ID to create the topic in. Required for multi-org users.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
Topic instance representing the newly created topic.
Raises
Invalid topic parameters.
Caller lacks permission to create topics.
Usage
Create a basic topic for camera data:
topic = Topic.create(
file_id="file_abc123",
topic_name="/camera/image",
schema_name="sensor_msgs/Image",
start_time=1722870127699468923,
end_time=1722870127799468923,
message_count=100,
)
print(topic.topic_id)
# topic_xyz789Create a topic with metadata and message paths:
from roboto.domain.topics import AddMessagePathRequest, CanonicalDataType
message_paths = [
AddMessagePathRequest(
message_path="header.stamp.sec",
data_type="uint32",
canonical_data_type=CanonicalDataType.Timestamp,
)
]
topic = Topic.create(
file_id="file_abc123",
topic_name="/imu/data",
schema_name="sensor_msgs/Imu",
metadata={"sensor_type": "IMU", "frequency": 100},
message_paths=message_paths,
)Topic.create_from_df()
Create a Topic from a pandas DataFrame and associate it with a file.
If a topic with the same name already exists for the specified file, it will be updated with the new data and schema.
Parameters
file_id strID of the file to associate this topic with.
dataset_id strID of the dataset containing the file.
topic_name strName for the topic. Must be unique within the file.
df pandas.pandas DataFrame containing the data to ingest. Must include a timestamp column (either explicitly specified or automatically detectable).
timestamp_column Optional[str]Name of the column to use as the timestamp. If not provided, the method will attempt to automatically detect a timestamp column by looking for the first column that is a timezone-aware timestamp type.
timestamp_unit Optional[Union[str, roboto.Unit of the timestamp column values. Required when timestamp_column contains numeric values (int, float, decimal). Valid values include “s”, “ms”, “us”, “ns”. Not needed for datetime columns or when timestamp_column is not specified.
caller_org_id Optional[str]Organization ID of the caller. If not provided, uses the default from the client context.
roboto_client Optional[roboto.Roboto client instance. If not provided, uses the default client.
Returns
The created or updated Topic instance.
Raises
If the timestamp column cannot be determined, is not present in the DataFrame, has an invalid type, or if the timestamp unit is required but not provided.
ImportErrorIf pandas or pyarrow are not installed. Install with pip install roboto[ingestion] to use this feature.
If the caller lacks permission to create topics or upload files to the specified dataset.
Notes
- For most use cases, prefer
File.add_topic()instead
Usage
Create a topic when you have file and dataset IDs:
import pandas as pd
from roboto.domain.topics import Topic
df = pd.DataFrame(
{
"timestamp": [1763947309.4198897, 1763947316.7686195, 1763947335.0095527],
"temperature": [20.5, 21.0, 20.8],
"humidity": [45.2, 46.1, 45.8],
}
)
topic = Topic.create_from_df(
file_id="file_abc123",
dataset_id="ds_xyz789",
topic_name="sensor_data",
df=df,
timestamp_column="timestamp",
timestamp_unit="s",
)
print(f"Created topic: {topic.name}")
# Created topic: sensor_dataUsing File.add_topic() is typically more convenient:
from roboto import File
file = File.from_id("file_abc123")
topic = file.add_topic("sensor_data", df, timestamp_column="timestamp", timestamp_unit="s")Properties
Topic.created
Timestamp when this topic was created in the Roboto platform.
Topic.created_by
Identifier of the user or system that created this topic.
Topic.dataset_id
Unique identifier of the dataset containing this topic, if applicable.
Topic.default_representation
Default representation used for accessing this topic’s data.
Topic.delete()
Delete this topic from the Roboto platform.
Permanently removes this topic and all its associated message paths and representations from the platform. This operation cannot be undone.
Raises
Topic does not exist or has already been deleted.
Caller lacks permission to delete the topic.
Return type
Usage
topic = Topic.from_id("topic_xyz789")
topic.delete()
# # Topic and all its data are now permanently deletedTopic.from_id()
Retrieve a topic by its unique identifier.
Fetches a topic record from the Roboto platform using its unique topic ID. This is the most direct way to access a specific topic when you know its identifier.
Parameters
topic_id strUnique identifier for the topic.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
Topic instance representing the requested topic.
Raises
Topic with the given ID does not exist.
Caller lacks permission to access the topic.
Usage
topic = Topic.from_id("topic_xyz789")
print(topic.name)
# '/camera/image'
print(topic.message_count)
# 100Topic.from_name_and_file()
Retrieve a topic by its name and associated file.
Fetches a topic record using its name and the file it’s associated with. This is useful when you know the topic name (e.g., “/camera/image”) and the file containing the topic data.
Parameters
topic_name strName of the topic to retrieve.
file_id strUnique identifier of the file containing the topic.
owner_org_id Optional[str]Organization ID to scope the search. If None, uses caller’s org.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
Topic instance representing the requested topic.
Raises
Topic with the given name does not exist in the specified file.
Caller lacks permission to access the topic.
Usage
topic = Topic.from_name_and_file(topic_name="/camera/image", file_id="file_abc123")
print(topic.topic_id)
# topic_xyz789
print(len(topic.message_paths))
# 5Topic.get_by_dataset()
List all topics associated with files in a dataset.
Retrieves all topics from files within the specified dataset. If multiple files contain topics with the same name (e.g., chunked files with the same schema), they are returned as separate topic objects.
Parameters
dataset_id strUnique identifier of the dataset to search.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Yields
Topic instances associated with files in the dataset.
Raises
Dataset with the given ID does not exist.
Caller lacks permission to access the dataset.
Return type
Usage
for topic in Topic.get_by_dataset("ds_abc123"):
print(f"Topic: {topic.name} (File: {topic.file_id})")
# Topic: /camera/image (File: file_001)
# Topic: /imu/data (File: file_001)
# Topic: /camera/image (File: file_002)
# Topic: /imu/data (File: file_002)# Count topics by name
from collections import Counter
topic_names = [topic.name for topic in Topic.get_by_dataset("ds_abc123")]
print(Counter(topic_names))
# Counter({'/camera/image': 2, '/imu/data': 2})Topic.get_by_file()
List all topics associated with a specific file.
Retrieves all topics contained within the specified file. This is useful for exploring the structure of robotics data files and understanding what data streams are available.
Parameters
file_id strUnique identifier of the file to search.
owner_org_id Optional[str]Organization ID to scope the search. If None, uses caller’s org.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Yields
Topic instances associated with the specified file.
Raises
File with the given ID does not exist.
Caller lacks permission to access the file.
Return type
Usage
for topic in Topic.get_by_file("file_abc123"):
print(f"Topic: {topic.name} ({topic.message_count} messages)")
# Topic: /camera/image (150 messages)
# Topic: /imu/data (1500 messages)
# Topic: /gps/fix (50 messages)# Get topics with specific schema
camera_topics = [topic for topic in Topic.get_by_file("file_abc123") if "camera" in topic.name]Topic.get_data()
Return this topic’s underlying data.
Retrieves and yields data records from this topic, with optional filtering by message paths and time range. Each yielded datum is a dictionary that matches this topic’s schema.
Parameters
message_paths_include Optional[collections.Dot notation paths that match attributes of individual data records to include. If None, all paths are included.
message_paths_exclude Optional[collections.Dot notation paths that match attributes of individual data records to exclude. If None, no paths are excluded.
start_time Optional[roboto.Start time (inclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
end_time Optional[roboto.End time (exclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
cache_dir Union[str, pathlib.Directory where topic data will be downloaded if necessary. Defaults to DEFAULT_CACHE_DIR.
representation_selector roboto.Criteria for selecting among multiple representations. Defaults to RepresentationSelector.raw() — original, untransformed data. Pass a RepresentationSelector to request a specific content format or transformation pipeline.
Yields
Timestamp and dictionary records that match this topic’s schema, filtered according to the parameters.
Return type
Notes
For each example below, assume the following is a sample datum record that can be found in this topic:
{“angular_velocity”: {
“x”: <uint32>, “y”: <uint32>, “z”: <uint32>
}, “orientation”: { “x”: <uint32>, “y”: <uint32>, “z”: <uint32>, “w”: <uint32> }
}
Usage
Print all data to stdout:
topic = Topic.from_name_and_file(...)
for timestamp, record in topic.get_data():
print(timestamp, record)Only include the “angular_velocity” sub-object, but filter out its “y” property:
topic = Topic.from_name_and_file(...)
for timestamp, record in topic.get_data(
message_paths_include=["angular_velocity"],
message_paths_exclude=["angular_velocity.y"],
):
...Only include data between two timestamps:
topic = Topic.from_name_and_file(...)
for timestamp, record in topic.get_data(
start_time=1722870127699468923,
end_time=1722870127699468924,
):
...Collect all topic data into a dataframe (requires installing the roboto[analytics] extra):
topic = Topic.from_name_and_file(...)
df = topic.get_data_as_df()Get the JPEG-encoded version of image data:
topic = Topic.from_name_and_file(...)
for timestamp, record in topic.get_data(
representation_selector=RepresentationSelector(content_format="jpeg"),
):
...Topic.get_data_as_df()
Return this topic’s underlying data as a pandas DataFrame.
Retrieves topic data and converts it to a pandas DataFrame for analysis and visualization. The DataFrame is indexed by log time and contains columns for each message path in the topic data.
Parameters
message_paths_include Optional[collections.Dot notation paths that match attributes of individual data records to include. If None, all paths are included.
message_paths_exclude Optional[collections.Dot notation paths that match attributes of individual data records to exclude. If None, no paths are excluded.
start_time Optional[roboto.Start time (inclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
end_time Optional[roboto.End time (exclusive) as nanoseconds since UNIX epoch or convertible to such by to_epoch_nanoseconds().
cache_dir Union[str, pathlib.Directory where topic data will be downloaded if necessary. Defaults to DEFAULT_CACHE_DIR.
representation_selector roboto.Criteria for selecting among multiple representations. Defaults to RepresentationSelector.raw() — original, untransformed data. Pass a RepresentationSelector to request a specific content format or transformation pipeline.
Returns
pandas DataFrame containing the topic data, indexed by log time.
Raises
ImportErrorpandas is not installed. Install with roboto[analytics] extra.
Notes
Requires installing this package using the roboto[analytics] extra.
An array-typed message path (for example a float32[3] acceleration) becomes a single column whose values are lists. Individual array elements are not addressable on their own — neither as separate DataFrame columns nor as message paths in message_paths_include / message_paths_exclude. Filter by the array’s path and unpack the column with numpy, as in the example below. np.stack requires every row to have the same length; a variable-length array path (for example a point cloud) must instead be processed row-wise, e.g. with df[col].map(...).
Usage
topic = Topic.from_name_and_file("/imu/data", "file_abc123")
df = topic.get_data_as_df()
print(df.head())
# angular_velocity.x angular_velocity.y ...
# log_time
# 1722870127699468923 0.1 0.2 ...
# 1722870127699468924 0.15 0.25 ...# Filter specific message paths
df_filtered = topic.get_data_as_df(
message_paths_include=["angular_velocity"], message_paths_exclude=["angular_velocity.z"]
)
print(df_filtered.columns.tolist())
# ['angular_velocity.x', 'angular_velocity.y']# Unpack a fixed-length array-typed path (a list-valued column) into a numpy array
import numpy as np
df_accel = topic.get_data_as_df(message_paths_include=["acceleration"])
xyz = np.stack(df_accel["acceleration"].to_numpy()) # shape (N, 3)Topic.get_message_path()
Get a specific message path from this topic.
Retrieves a MessagePath object for the specified path, enabling access to individual fields or signals within the topic’s data schema.
Parameters
message_path strDot-delimited path to the desired attribute (e.g., “pose.position.x”).
Returns
MessagePath instance for the specified path.
Raises
ValueErrorNo message path with the given name exists in this topic.
Usage
topic = Topic.from_name_and_file("/imu/data", "file_abc123")
angular_vel_x = topic.get_message_path("angular_velocity.x")
print(angular_vel_x.canonical_data_type)
# CanonicalDataType.Number# Access message path statistics
print(angular_vel_x.mean)
# 0.125
print(angular_vel_x.std_dev)
# 0.05Topic.get_schema()
Retrieve the schema for this topic, if one exists.
Returns
A TopicSchema describing the message structure of this topic, or None if this topic has no schema.
Raises
schema_id references a schema that no longer exists.
Usage
topic = Topic.from_id("topic_xyz789")
schema = topic.get_schema()
if schema is not None:
for field in schema.fields:
print(field.name, field.data_type)Topic.get_time_bounds_by_association()
Get the earliest start and latest end across every topic of a file or dataset.
The same aggregate you would reach by folding start_time and end_time over the topics of that file or dataset, computed server-side in one request instead of one per page of topics.
Parameters
association roboto.The file or dataset whose topics are aggregated, e.g. Association.file("file_abc123").
owner_org_id Optional[str]Organization ID to scope the lookup. If None, uses caller’s org.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
Bounds in nanoseconds since the Unix epoch. Both fields are None when the association holds no topics, and either is None when no topic of the association carries that timestamp.
Raises
Caller lacks permission to access the file or dataset.
Usage
from roboto.association import Association
bounds = Topic.get_time_bounds_by_association(Association.file("file_abc123"))
print(bounds.start_time, bounds.end_time)
# 1722870127699468923 1722870187004821001Properties
Topic.message_count
Total number of messages in this topic.
Topic.message_paths
Sequence of message path records defining the topic’s schema.
Topic.metadata
Metadata dictionary associated with this topic.
Topic.modified
Timestamp when this topic was last modified.
Topic.modified_by
Identifier of the user or system that last modified this topic.
Topic.record
Topic representation in the Roboto database.
This property is on the path to deprecation. All TopicRecord attributes are accessible directly using a Topic instance.
Topic.refresh()
Refresh this topic instance with the latest data from the platform.
Fetches the current state of the topic from the Roboto platform and updates this instance’s data. Useful when the topic may have been modified by other processes or users.
Usage
topic = Topic.from_id("topic_xyz789")
# Topic may have been updated by another process
topic.refresh()
print(f"Current message count: {topic.message_count}")Return type
Properties
Topic.schema_checksum
Checksum of the topic’s message schema for validation.
Topic.schema_id
ID of the schema for this topic.
None if the topic has no schema, or if the schema has not yet been populated.
Topic.schema_name
Name of the message schema (e.g., ‘sensor_msgs/Image’).
Topic.set_default_representation()
Set the default representation for this topic.
Designates a specific representation as the default for this topic, which will be used when accessing topic data without specifying a particular representation.
Parameters
association roboto.Association pointing to the representation data.
storage_format roboto.Format of the representation data.
version intVersion number of the representation.
format Optional[str]Content format descriptor (e.g. “jpeg”, “sensor_msgs/Image”).
transformations Optional[list[str]]Transformation descriptors applied (e.g. [“downsample:0.5”]).
Returns
RepresentationRecord representing the newly set default representation.
Raises
Specified representation does not exist.
Caller lacks permission to modify the topic.
Usage
from roboto.association import Association
from roboto.domain.topics import RepresentationStorageFormat
topic = Topic.from_id("topic_xyz789")
default_repr = topic.set_default_representation(
association=Association.file("file_repr_456"),
storage_format=RepresentationStorageFormat.MCAP,
version=2,
)
print(topic.default_representation.representation_id)
# repr_789Properties
Topic.start_time
Start time of the topic data in nanoseconds since UNIX epoch.
Topic.to_association()
Convert this topic to an Association object.
Creates an Association object that can be used to reference this topic in other parts of the Roboto platform.
Returns
Association object representing this topic.
Usage
topic = Topic.from_id("topic_xyz789")
association = topic.to_association()
print(association.association_type)
# AssociationType.Topic
print(association.association_id)
# topic_xyz789Topic.update()
Updates a topic’s attributes and (optionally) its message paths.
Parameters
schema_name Union[Optional[str], roboto.topic schema name. Setting to None clears the attribute.
schema_checksum Union[Optional[str], roboto.topic schema checksum. Setting to None clears the attribute.
start_time Union[Optional[int], roboto.topic data start time, in epoch nanoseconds. Must be non-negative. Setting to None clears the attribute.
end_time Union[Optional[int], roboto.topic data end time, in epoch nanoseconds. Must be non-negative, and greater than start_time. Setting to None clears the attribute.
message_count Union[int, roboto.number of messages recorded for this topic. Must be non-negative.
metadata_changeset Union[roboto.a set of changes to apply to the topic’s metadata
message_path_changeset Union[roboto.a set of additions, deletions or updates to this topic’s message paths. Updating or deleting non-existent message paths has no effect. Attempting to (re-)add existing message paths raises RobotoConflictException, unless the changeset’s replace_all flag is set to True
Returns
this Topic object with any updates applied
Raises
if any method argument has an invalid value, e.g. a negative message_count
if, as part of the update, an attempt is made to add an already extant message path, and to this topic, and replace_all is not toggled on the message_path_changeset
Topic.update_message_path()
Update the metadata and attributes of a message path.
Modifies an existing message path within this topic, allowing updates to its metadata, data type, and canonical data type. This is useful for correcting or enhancing message path definitions after initial creation.
Parameters
message_path strName of the message path to update (e.g., “pose.position.x”).
metadata_changeset Union[roboto.Metadata changeset to apply to any existing metadata.
data_type Union[str, roboto.Native (application-specific) message path data type.
canonical_data_type Union[roboto.Canonical Roboto data type corresponding to the native data type.
path_in_schema Union[list[str], roboto.Returns
MessagePath instance representing the updated message path.
Raises
No message path with the given name exists for this topic.
Caller lacks permission to modify the topic.
Usage
from roboto.updates import TaglessMetadataChangeset
from roboto.domain.topics import CanonicalDataType
topic = Topic.from_id("topic_xyz789")
# Update metadata for a message path
changeset = TaglessMetadataChangeset(put_fields={"unit": "meters"})
updated_path = topic.update_message_path(message_path="pose.position.x", metadata_changeset=changeset)
print(updated_path.metadata["unit"])
# meters# Update data type and canonical type
updated_path = topic.update_message_path(
message_path="velocity", data_type="float64", canonical_data_type=CanonicalDataType.Number
)TopicDataService
Internal service for retrieving topic data.
This service handles the low-level operations for accessing topic data that has been ingested by the Roboto platform. It manages downloads, filtering, and processing various data formats to provide efficient access to time-series robotics data.
Parameters
roboto_client roboto.cache_dir Union[str, pathlib.Attributes
TopicDataService.DEFAULT_CACHE_DIR
TopicDataService.get_data()
Retrieve data for a specific topic with optional filtering.
Parameters
topic_id strUnique identifier of the topic to retrieve data for.
message_paths_include Optional[collections.Dot notation paths to include in the results. If None, all paths are included.
message_paths_exclude Optional[collections.Dot notation paths to exclude from the results. If None, no paths are excluded.
start_time Optional[roboto.Start time (inclusive) for temporal filtering.
end_time Optional[roboto.End time (exclusive) for temporal filtering.
cache_dir_override Union[str, pathlib.Override the default cache directory for downloads.
representation_selector roboto.Criteria for selecting among multiple representations. Defaults to RepresentationSelector.raw().
Yields
Tuple of (timestamp, record) where timestamp is in nanoseconds since Unix epoch.
Return type
TopicDataService.get_data_as_df()
Retrieve data for a specific topic as a pandas DataFrame with optional filtering.
Parameters
topic_id strUnique identifier of the topic to retrieve data for.
message_paths_include Optional[collections.Dot notation paths to include in the results. If None, all paths are included.
message_paths_exclude Optional[collections.Dot notation paths to exclude from the results. If None, no paths are excluded.
start_time Optional[roboto.Start time (inclusive) for temporal filtering.
end_time Optional[roboto.End time (exclusive) for temporal filtering.
cache_dir_override Union[str, pathlib.Override the default cache directory for downloads.
representation_selector roboto.Criteria for selecting among multiple representations. Defaults to RepresentationSelector.raw().
Returns
pandas.DataFrame The index of the DataFrame (df.index) is a pandas.DateTimeIndex, labeling the timestamp of each row.
TopicIdentityRecord
Bases: pydantic.BaseModel
A durable identity for a topic.
Within an organization, topic names are unique: data logged under the same topic name in different files shares a single identity record.
Parameters
data AnyAttributes
TopicIdentityRecord.created
TopicIdentityRecord.created_by
TopicIdentityRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TopicIdentityRecord.modified
TopicIdentityRecord.modified_by
TopicIdentityRecord.name
Human-readable topic name (e.g., "/camera/image_raw"). Unique within an organization.
TopicIdentityRecord.org_id
TopicPartitionRecord
Bases: pydantic.BaseModel
One file’s data for a topic.
Pairs a topic identity with a file and carries the facts that vary from file to file: the schema the file’s messages follow (schema_id), the device that produced them, and the data_range locating them inside the file, for formats that pack several slices of data into one shared file. A partition references a file, not a specific version; reads always resolve to the current version.
Parameters
data AnyAttributes
TopicPartitionRecord.created
TopicPartitionRecord.created_by
TopicPartitionRecord.data_range
The slice of the file this partition’s data occupies, as (start, end), or None for the whole file.
start alone identifies the partition within its (topic, file) pair, since a slice’s starting position is stable across re-ingest: re-declaring a slice that begins at the same position updates the existing partition instead of adding a second, overlapping one.
TopicPartitionRecord.device_id
ID of the device that produced this partition’s data, if known.
TopicPartitionRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TopicPartitionRecord.modified
TopicPartitionRecord.modified_by
TopicPartitionRecord.org_id
TopicPartitionRecord.topic_part_id
TopicRecord
Bases: pydantic.BaseModel
Record representing a topic in the Roboto platform.
A topic is a collection of timestamped data records that share a common name and association (typically a file). Topics represent logical data streams from robotics systems, such as sensor readings, robot state information, or other time-series data.
Data from the same file with the same topic name are considered part of the same topic. Data from different files or with different topic names belong to separate topics, even if they have similar schemas.
When source files are chunked by time or size but represent the same logical data collection, they will produce multiple topic records for the same “logical topic” (same name and schema) across those chunks.
Parameters
data AnyAttributes
TopicRecord.association
Identifier and entity type with which this Topic is associated. E.g., a file, a dataset.
TopicRecord.created
TopicRecord.created_by
TopicRecord.default_representation
Default Representation for this Topic. Assume that if a MessagePath is not more specifically associated with a Representation, it should use this one.
TopicRecord.end_time
Timestamp of oldest message in topic, in nanoseconds since epoch (assumed Unix epoch).
TopicRecord.message_count
TopicRecord.message_paths
Zero to many MessagePathRecords associated with this TopicSource.
TopicRecord.modified
TopicRecord.modified_by
TopicRecord.org_id
TopicRecord.schema_checksum
Checksum of topic schema. May be None if topic does not have a known/named schema.
TopicRecord.schema_id
ID of the schema record for this topic. May be None if the topic has no schema, or if the schema record has not yet been populated.
TopicRecord.schema_name
Type of messages in topic. E.g., “sensor_msgs/PointCloud2”. May be None if topic does not have a known/named schema.
TopicRecord.start_time
Timestamp of earliest message in topic, in nanoseconds since epoch (assumed Unix epoch).
TopicRecord.topic_id
TopicRecord.topic_name
TopicSchema
Describes the field structure of a topic’s messages.
A topic schema is identified by a name (e.g., "sensor_msgs/Imu") and a content-based checksum deterministically derived from its fields. Schemas are deduplicated within an organization: topics whose fields share the same names, paths, and data types reference the same schema.
Use from_id() when you already know the schema_id. Topic.get_schema() retrieves the schema associated with a specific topic.
Usage
Retrieve a schema and inspect its fields:
from roboto.domain.topics import TopicSchema
schema = TopicSchema.from_id("ts_abc123")
print(schema.name, schema.checksum)
for field in schema.fields:
print(field.path_in_schema, field.data_type)Parameters
fields list[roboto.roboto_client roboto.Properties
TopicSchema.fields
Field definitions belonging to this schema.
TopicSchema.from_id()
Retrieve a schema by its ID.
Parameters
schema_id strUnique identifier of the schema to retrieve.
roboto_client Optional[roboto.HTTP client for API communication. If None, uses the default client.
Returns
A TopicSchema for the given schema_id.
Raises
No schema with this ID exists.
Usage
from roboto.domain.topics import TopicSchema
schema = TopicSchema.from_id("ts_abc123")
for field in schema.fields:
print(field.path_in_schema, field.data_type)Properties
TopicSchema.name
Informational label for the schema (e.g. "sensor_msgs/Imu"). Not part of identity; may be None.
TopicSchema.record
Underlying schema record.
TopicSchemaRecord
Bases: pydantic.BaseModel
A content-addressed topic schema.
Within an organization, two schemas with identical fields share a single record (identified by a deterministic checksum of the fields). name is a mutable, informational label (last-writer-wins) and is not part of the schema’s identity.
Parameters
data AnyAttributes
TopicSchemaRecord.checksum
Deterministic checksum computed over the schema’s fields; identical schemas share a checksum.
TopicSchemaRecord.created
TopicSchemaRecord.created_by
TopicSchemaRecord.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
TopicSchemaRecord.modified
TopicSchemaRecord.modified_by
TopicSchemaRecord.name
Informational label for the schema (e.g., "sensor_msgs/PointCloud2"). Not part of identity.
TopicSchemaRecord.org_id
TopicTimeBounds
Bases: pydantic.BaseModel
Earliest start and latest end, in epoch nanoseconds, across a set of topics.
The aggregate of the start_time and end_time of every topic in the set, computed server-side so a caller does not have to page the whole set to fold them.
Either field is None when no topic in the set carries that timestamp — because the set is empty, or because every topic in it left that bound unset.
Parameters
data AnyTransformationKind
Bases: roboto.compat.StrEnum
Canonical vocabulary of transformations that can be applied when producing a representation.
A transformation is serialized into RepresentationRecord.transformations as a "<kind>:<param>" string (e.g. "downsample:0.5", "encode:jpeg"). This enum is the source of truth for the set of supported kinds; the parameter tail remains free-form because different kinds carry different parameter shapes (floats, format tokens, etc.).
Producers should construct transformation strings via with_param() and consumers should destructure them via parse() to keep the vocabulary centralized.
Usage
TransformationKind.DOWNSAMPLE.with_param(0.5)
# 'downsample:0.5'
TransformationKind.parse("encode:jpeg")
# (<TransformationKind.ENCODE: 'encode'>, 'jpeg')TransformationKind.parse()
Parse a "<kind>:<param>" transformation descriptor into its kind and raw parameter.
Parameters
descriptor strRaises
ValueErrorIf the kind prefix is not a known TransformationKind member.
Return type
TransformationKind.with_param()
Construct a transformation descriptor string for this kind with the given parameter.
Parameters
param objectReturn type
UpdateMessagePathRequest
Bases: pydantic.BaseModel
Request to update an existing message path within a topic.
Allows modification of message path attributes including metadata, data type, and canonical data type. Used to correct or enhance message path definitions after initial creation.
Parameters
data AnyAttributes
UpdateMessagePathRequest.canonical_data_type
Canonical Roboto data type for the data under this message path (optional).
Note: updating this attribute should be done with care, as it affects Roboto’s ability to interpret and visualize the data.
UpdateMessagePathRequest.data_type
Native data type for the data under this message path (optional).
UpdateMessagePathRequest.has_updates()
Check whether this request would result in any message path modifications.
Returns
True if the request contains changes that would modify the message path.
Attributes
UpdateMessagePathRequest.metadata_changeset
A set of changes to the message path’s metadata (optional).
UpdateMessagePathRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
UpdateMessagePathRequest.path_in_schema
List of path components representing the field’s location in the source data schema (optional).
For nested fields like ‘position.x’, this would be [‘position’, ‘x’].
UpdateTopicRequest
Bases: pydantic.BaseModel
Request to update an existing topic’s properties.
Allows modification of topic attributes including temporal boundaries, message count, schema information, metadata, and message paths.
Parameters
data AnyAttributes
UpdateTopicRequest.end_time
UpdateTopicRequest.message_count
UpdateTopicRequest.message_path_changeset
UpdateTopicRequest.metadata_changeset
UpdateTopicRequest.model_config
model_config #Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].