roboto.experimental.topics.decode.mcap#

Module Contents#

roboto.experimental.topics.decode.mcap.decode_mcap_batches(scan_task, timestamp, window, projection_paths, params)#

Decode one MCAP scan task into native-order RecordBatches, filtered and projected.

Every chunk’s bytes go straight to the Rust mcap_codec batch decoder, which parses and decompresses the chunk, decodes each supported encoding’s payloads into Arrow columns, and window-filters and timestamps rows in Rust — one RecordBatch per chunk.

A chunked, single-schema file whose schema encoding the codec handles (_SUPPORTED_SCHEMA_ENCODINGS — the ROS/CDR family plus JSON and msgpack, which rides a jsonschema schema) is supported, which is what topic-data ingestion produces. Unchunked, summary-less, multi-schema, and unsupported-encoding files are rejected.

Batches come out in the file’s persisted (native chunk) order, which the partition overlay and cross-partition concatenation rely on (see DecodedScanTask.batches()).

Raises:

RobotoInternalException – The file is not a chunked, single-schema MCAP whose schema encoding this read path supports (e.g. an unchunked file or a protobuf channel).

Parameters:
Return type:

collections.abc.Generator[pyarrow.RecordBatch, None, None]