Skills

Rerun Mcap

Ingest MCAP files into Rerun chunk streams with rerun.chunk.McapReader.

Install

npx skills add rerun-io/rerun --skill rerun-mcap -g -a claude-code -y
Repository
rerun-io/rerun11.7k
Category
Engineering
Updated
3d ago
License
Apache-2.0
Context cost
Lightabout 1,266 tokens
Runs scripts
No, instructions only

What it does

Ingest MCAP files into Rerun chunk streams with rerun.chunk.McapReader. Read when converting an MCAP recording, selecting topics or decoders, decoding custom protobuf messages, or when an MCAP-derived stream comes out empty. Builds on rerun-chunk-processing (stream mechanics) and rerun-data-model (what the topics should become).

Rerun MCAP ingestion

McapReader turns an MCAP file into a lazy chunk stream: one entity per topic at the topic's path, message payloads decoded by pluggable decoders. This skill covers the reader's options, what each topic becomes, and the failure modes that yield an empty stream with no error. Stream mechanics (filter, drop, lenses, merge, write) are in rerun-chunk-processing.

The API

from rerun.chunk import McapReader

reader = McapReader(mcap_path)  # see help(McapReader) for the full option set
stream = reader.stream()

A URDF embedded in the MCAP can be ingested as well (then see rerun-urdf).

What a topic becomes

With the default decoders (decoders=None), the message schema name decides what a topic becomes, pass archetypes through, lens only the raw :message topics:

MCAP schema namedecodes towhat to do
foxglove.FrameTransformsTransform3Dpass through; do not hand-build
foxglove.CameraCalibrationPinholepass through
foxglove.CompressedVideoVideoStream (real sample bytes) + CoordinateFramepass through
other foxglove.* well-known typesthe matching archetypepass through
ros2 well-known types (ros2msg / ros2_reflection)archetypepass through
your own schemas.proto.* / custom protobufone <schema.name>:message structattach semantics with a DeriveLens + Selector

So a camera topic already arrives as Pinhole, its video as VideoStream, and a frame_transforms topic as Transform3D, only custom messages (e.g. a custom joint states schema, a custom gripper status enum) come through reflection or raw only and need lenses.

Read the whole SKILL.md on GitHub

More in Engineering