roboto.domain.topics.omgidl#

Decoding of OMG IDL (omgidl / ros2idl) CDR messages from MCAP files.

Robotics data recorded directly from DDS (e.g. RTI Connext) carries OMG IDL schemas and CDR payloads that mix plain CDR with XCDR1- and XCDR2-mutable extensibility. This package provides an mcap.decoder.DecoderFactory that decodes all of those variants, for use by McapReader.

Submodules#

Package Contents#

exception roboto.domain.topics.omgidl.OmgidlDecodeError#

Bases: mcap.exceptions.McapError

Raised when an omgidl / ros2idl message cannot be decoded.

class roboto.domain.topics.omgidl.OmgidlDecoderFactory#

Bases: mcap.decoder.DecoderFactory

Decode CDR messages described by omgidl or ros2idl schemas.

Supply an instance to mcap.reader.make_reader(). The schema is parsed once per schema id (by the shared Rust mcap_codec decoder); the returned callable then decodes each message into nested dict / sequence / scalar values – numeric arrays/sequences as array.array, octet sequences as bytes, and nested/heterogeneous sequences as list (see the module docstring).

decoder_for(message_encoding, schema)#

If the message encoding and schema arguments can be decoded by this decoder factory, returns a callable to decode message bytes.

Parameters:
  • message_encoding (str)

  • schema (Optional[mcap.records.Schema])

Return type:

Optional[Callable[[bytes], Any]]

roboto.domain.topics.omgidl.make_omgidl_decoder_factory()#

Build a decoder factory for omgidl / ros2idl CDR messages, backed by the shared Rust mcap_codec decoder.

Return type:

OmgidlDecoderFactory