Skip to content

rldb/mcap: vendor MCAP spec 0.1 and validator - #718

Draft
SaveAanchal wants to merge 2 commits into
mainfrom
aanchal/mcap-validator
Draft

SaveAanchal wants to merge 2 commits into
mainfrom
aanchal/mcap-validator

Conversation

@SaveAanchal

@SaveAanchal SaveAanchal commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #717.

What

What vendors deliver, and the check every delivery passes before it is converted to Lance. One raw MCAP per whole recording: episode_<id>/episode.mcap, plus an optional annotation.mcap for labels.

  • egomimic/rldb/mcap/SPEC.md: the vendor-facing spec, covering:
    • layout and clock (absolute Unix ns);
    • human and Eva topic tables;
    • episode info: lab / site / vendor as in the Lance pilot, and vendor-recording-id for recording_id;
    • hands: hand-joints names each vendor's layout, and the wrist frame convention;
    • frames, cameras (one frame per message, lens models, upright rotation), tasks and labels;
    • how each Lance field is filled.
  • spec.py: the same rules as data. schemas.py: the egoverse.* messages, rendered to proto/egoverse.proto for vendors.
  • validate.py: python -m egomimic.rldb.mcap.validate episode_<id>/....
    • Check groups: presence and types, video, clocks, calibration and frame graph, IMU, poses, and task/label spans. The label rules are the same ones lance/annotations.py applies.

    • Frame rules the converter relies on:

      • a camera's video, -info and -info-extra must name the same frame;
      • on a head-worn rig, the main (steps) camera needs a /tf_static path to head, which is how the steps are placed;
      • /tf_static translations must be finite, as well as its rotations being unit.

      Each of these used to pass validation and then fail inside conversion.

    • Output: PASS or the list of problems, plus the Lance recording_id the episode will get.

Tests

  • tests/unit/test_mcap_validate.py: synthetic episodes, each with one breakage, must report exactly that problem. That includes a calibration naming another frame than its video, a steps camera fixed in the world instead of on the head, and a NaN static translation. Also checks proto/enum sync and the Lance ID and annotation types.
  • tests/integration/test_mcap_abc.py: real episodes, via EGOVERSE_TEST_* paths.
  • Real Aria check: two Aria recordings (VRS + MPS) converted to the spec both pass.
  • Ryan's columns: every column of aria_to_lance's steps rebuilds from those MCAPs alone.

pyproject.toml adds mcap, mcap-protobuf-support and foxglove-schemas-protobuf, and ships the .proto.

🤖 Generated with Claude Code

RyanPCo commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

SaveAanchal and others added 2 commits October 22, 2026 09:55
What vendors deliver (one raw episode_<id>/episode.mcap per recording, plus optional
annotation.mcap) and the check every delivery goes through before conversion to Lance:

- SPEC.md: the vendor-facing spec; spec.py: the same rules as data (human / robot
  topic profiles, episode-info keys, frames, thresholds); schemas.py: the egoverse.*
  message types, rendered to proto/egoverse.proto for vendors.
- validate.py: `python -m egomimic.rldb.mcap.validate episode_<id>/...` checks
  presence, video, clocks, calibration, IMU, poses and task/label spans, and prints
  the Lance recording_id each episode will get.
- tests: synthetic episodes with one switch per mistake (each must report exactly its
  problem), proto/enum sync, and an integration run on real episodes.
- pyproject: mcap, mcap-protobuf-support, foxglove-schemas-protobuf; ships the .proto.

Checked on two real Aria recordings converted to the spec: both pass, and every column
of aria_to_lance's steps rebuilds from the MCAP alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er trips on

Found in review; each passed validation and then failed in conversion:
- a camera whose -info / -info-extra name another frame than its video frames
  (conversion multiplied through the wrong frame). The video, -info and -info-extra
  must now name the same frame.
- a head-worn rig's steps camera not rigidly mounted on the head (e.g. its calibration
  in `world`): the converter places the steps through a /tf_static path from `head` to
  that camera, which is now required. (A frame placed nowhere is still reported once,
  as having no path to world.)
- a NaN / Inf /tf_static translation (conversion: "SVD did not converge"); only the
  rotations were checked. Translations must now be finite.

SPEC.md states the three rules. Both real Aria test recordings still validate clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@RyanPCo
RyanPCo force-pushed the aanchal/mcap-validator branch from c30cb1d to 378e486 Compare October 22, 2026 14:06
@RyanPCo
RyanPCo changed the base branch from ryanco/rldb-multi to main October 22, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants