rerun-mcap
Skill này làm gì
Skill này hướng dẫn agent biến một file ghi MCAP thành dữ liệu mà Rerun có thể hiển thị. Dành cho người ghi nhật ký robot hoặc cảm biến ở định dạng MCAP.
Khi nào nên dùng
- ✓Khi bạn muốn chuyển một file ghi MCAP để xem trong Rerun.
- ✓Khi bạn cần chọn topic MCAP nào để đưa vào hoặc cách giải mã các thông điệp protobuf tùy chỉnh.
- ✓Khi dữ liệu MCAP sau chuyển đổi bị rỗng và bạn cần tìm nguyên nhân.
Liên kết skill
https://github.com/rerun-io/rerun/blob/main/skills/rerun-mcap/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bản ghi MCAP của tôi chuyển sang Rerun nhưng kết quả rỗng. Có chuyện gì sai vậy?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích mỗi topic trong bản ghi trở thành một entity Rerun như thế nào và loại thông điệp chuẩn nào nên giữ nguyên. Nó cũng liệt kê các lý do thường gặp khiến kết quả rỗng.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Skill có giải mã được kiểu thông điệp riêng của tôi không?
Có. Nó bao quát việc giải mã thông điệp protobuf tùy chỉnh, mỗi kiểu thông điệp trở thành một thành phần có cấu trúc.
Vì sao một số topic được giữ nguyên không thay đổi?
Các kiểu chuẩn như biến đổi tọa độ và hiệu chuẩn camera đã được giải mã sang kiểu của Rerun, nên skill bảo giữ nguyên chúng.
Skill có bao quát mô hình robot trong bản ghi không?
Mô hình robot trong file được xử lý bởi một skill liên quan, rerun-urdf.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 12k
- Vị trí xếp hạng
- #11555
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
investigate-puffin
12kGiúp agent phân tích các bản ghi profiler Puffin (file .puffin), tìm đoạn code chậm và so sánh trace trước và sau một thay đổi.
rerun-blueprint
12kDạy agent thay đổi giao diện trình xem Rerun bằng cách viết blueprint cho một bản ghi hoặc bảng, gồm bố cục, view và các cột ẩn.
rerun-catalog-queries
12kGiúp agent truy vấn catalog Rerun từ Python nhanh hơn, với các mẹo về số lượt gọi qua lại, dung lượng dữ liệu và việc đọc dataset chậm.
rerun-chunk-processing
12kDạy agent xây dựng pipeline dữ liệu Rerun với reader và lens, chuyển các file MCAP, Parquet, video hoặc RRD thành bản ghi Rerun.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.