rerun-mcap
できること
このスキルは、MCAP形式で記録されたファイルを、Rerunで表示できるデータに変換する手順をエージェントに案内します。ロボットやセンサーのログをMCAP形式で記録する人向けです。
使う場面
- ✓MCAPの記録ファイルを、Rerunで見られるように変換したいとき。
- ✓含めるMCAPのトピックを選ぶ、またはカスタムのprotobufメッセージのデコード方法を決める必要があるとき。
- ✓変換したMCAPのデータが空になり、その原因を調べる必要があるとき。
スキルのリンク
https://github.com/rerun-io/rerun/blob/main/skills/rerun-mcap/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のMCAPの記録はRerunに変換できますが、結果が空です。何が問題ですか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、記録内の各トピックがRerunのエンティティになる仕組みと、標準のメッセージ型をそのまま残すべきものを説明します。また、結果が空になる一般的な理由も挙げています。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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 name | decodes to | what to do |
|---|---|---|
foxglove.FrameTransforms |
Transform3D |
pass through; do not hand-build |
foxglove.CameraCalibration |
Pinhole |
pass through |
foxglove.CompressedVideo |
VideoStream (real sample bytes) + CoordinateFrame |
pass through |
other foxglove.* well-known types |
the matching archetype | pass through |
ros2 well-known types (ros2msg / ros2_reflection) |
archetype | pass through |
your own schemas.proto.* / custom protobuf |
one <schema.name>:message struct |
attach 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.
The foxglove decoder does the schema→archetype mapping; because foxglove messages are protobuf-encoded it rides on the protobuf decoder, so keep decoders=None (verified: decoders=["protobuf"] alone leaves foxglove.CameraCalibration a raw :message; adding foxglove makes it a Pinhole). Confirm on your file: McapReader(path).stream(), then read McapSchema:name and a few Chunk.format() before deciding anything is missing or needs rebuilding.
- Entity path = topic name (
/sensors/joint_statesstays/sensors/joint_states). Filter early:McapReader(path).stream().filter(content="/sensors/**"). - A reflection-decoded message lands as one struct component named
<fully.qualified.MessageName>:message. Navigate it withSelector(Selector(".joint_positions")) inside lenses; this is how custom messages get Rerun semantics attached (see the DeriveLens patterns inrerun-chunk-processing). - Topic regexes use RE2 syntax and are not anchored:
cammatches/external/cam_lowand/camera_info. Anchor explicitly (^/external/cam) when it matters. Prefer reader-level topic filtering over.filter(...)when you can, so excluded topics are never decoded at all.
When to use the low-level mcap package instead
McapReader keeps payloads in columnar chunk streams; that is almost always what you want.
Drop to mcap.reader.make_reader only when you need raw record metadata without payloads, or when you need to rewrite the container itself (re-registering schemas, channels, and messages).
Gotchas
- Empty stream, no error: a topic regex that matched nothing, or a channel
whose decoder produced no rows. Check
Chunk.format()on a few chunks ofreader.stream().to_chunks()against a tiny test file, or compare topic names with themcapCLI / package first. - Topic regexes are unanchored RE2; excludes run after includes.
timeline_type="timestamp"interprets MCAP log times as wall-clock ns since epoch. If the recording's clock is wrong, fix it at the reader withtimestamp_offset_nsrather than mutating timestamps downstream.- Decoder subsets silently skip topics no decoder claims; when a topic is
missing, retry with
decoders=Noneto rule out decoder selection. - Example fix-lenses are dataset-specific. Before copying a
MutateLenslike thePinhole:resolutionswap from therobot_data_preprocessingexample, read the raw component fromMcapReader(path).stream()and confirm the defect exists in your data — applied blindly it corrupts correct calibration (a correct 648×480 flipped to 480×648). foxglovederives both the camera'sPinhole:child_frameand the video'sCoordinateFrame:framefrom each message's.frame_id(plus an image-plane
よくある質問
私独自のメッセージ型をデコードできますか?
はい。カスタムのprotobufメッセージのデコードに対応し、各メッセージ型が一つの構造化されたコンポーネントになります。
なぜ一部のトピックはそのまま通すのですか?
座標変換やカメラの校正のような標準の型は、すでにRerunの型にデコードされるため、このスキルはそのまま残すよう定めています。
記録に含まれるロボットのモデルも扱いますか?
記録内のロボットのモデルは、関連するrerun-urdfのスキルが扱います。
詳細
作者による元の説明
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).
repo: rerun-io/rerun
人気
- GitHubのスター
- 12k
- ランキング
- #11555
- ライセンス
- Apache-2.0
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
investigate-puffin
12kPuffinプロファイラーの記録(.puffinファイル)を調べ、遅いコード箇所を見つけ、変更前後のトレースを比較するようエージェントを支援します。
rerun-blueprint
12kブループリントを書いてRerunビューアーの見た目を変える方法を、レイアウト、ビュー、非表示の列を含めてエージェントに教えます。
rerun-catalog-queries
12k往復回数、データ量、遅いデータセットの読み取りに関するヒントを使い、PythonからRerunカタログへのクエリを速くするようエージェントを支援します。
rerun-chunk-processing
12kreaderとlensを使ってMCAP、Parquet、動画、RRDのファイルを録画に変換するRerunのデータパイプラインを作る方法をエージェントに教えます。
似ているスキル
gitcrawl
394k保存されたGitHubのイシューとプルリクエストのアーカイブを検索し、重複をまとめ、GitHub上の現在の状態を確認するようエージェントを支援します。
slacrawl
394kローカルのSlackアーカイブ内のメッセージを検索して件数を数え、アーカイブの新しさを確認し、必要に応じて更新するようエージェントを支援します。
goplaces
394kGoogle Placesを使って、場所を検索し、詳細や口コミを取得し、場所の名前を解決するようエージェントを支援します。スクリプト用にJSON出力もできます。