Skip to content

Record canonical collection messages and export CDR datasets - #4717

Closed
TomCC7 wants to merge 2 commits into
cc/feat/cdr-r1-streamsfrom
cc/feat/cdr-collection
Closed

TomCC7 wants to merge 2 commits into
cc/feat/cdr-r1-streamsfrom
cc/feat/cdr-collection

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026

Copy link
Copy Markdown
Member

Collection's episode monitor and recorder now agree with WebXR/coordinator generated CDR ports: UInt32 buttons, String status, Image and JointState. The existing EpisodeStatus JSON document and state machine stay intact; the document's timestamp still defines episode boundaries. DataPrep projects canonical image row layout and named joint vectors, retaining sparse-command reconstruction and existing dataset selection behavior.

Project: https://linear.app/dimensional/project/message-encoding-refactor-05a3ddb4af3e/overview

Parent: #4716 (a9b0d06211aae2d47e7b140834e6eccc8ef0cd61). This is one verified graph in an incomplete proposal. Isolated LeRobot host/worker ports, other remaining graphs, final dependency retirement and stack organization follow.

File change summary

Category Files Added Deleted Review focus
Collection/DataPrep runtime 4 84 50 Canonical ports/default CDR SQLite codec; padded image views; named joint reconstruction; explicit historical MCAP refusal
Behavior/regression tests 5 268 121 Actual local CDR monitor/recorder/reopen; canonical synthetic fixtures with retained assertions; real HDF5/LeRobot exports
CI and existing documentation 2 27 0 Installed-package acceptance and embedded offline test command

MCAP dataset fixtures now contain complete ros2msg schemas with plain CDR values and standard NONE/ZSTD chunk compression. DataPrep no longer imports historical Python message classes from recording metadata to load LCM codecs. Historical typed LCM/JPEG-in-LCM MCAP inputs fail with an explicit conversion instruction. Unrelated generic object/telemetry formats are outside this change.

Verification

  • 152 source tests and the same 152 tests against production modules from a wheel installed in a separate venv, with python -I and site-packages assertions.
  • Four production files pass strict typing. Scoped configured hooks pass except Nix lint, which is unavailable because nix is absent.
  • Wheel SHA-256: af1f4a11f6e31d16db5f1533854f43593d059e7ae6c78f343f0e2717ae781fcb.
  • Actual memq and discovery-disabled loopback Zenoh UInt32 input -> EpisodeMonitor -> CDR String -> CollectionRecorder -> SQLite close/reopen -> episode extraction and feature projection.
  • Exact generated Header nanoseconds, padded RGB pixels, joint-name ordering, document/source-vs-reception episode time, original sparse-command/episode filtering assertions, HDF5 arrays and actual LeRobot video/Parquet/metadata assertions.
  • Existing optional-MCAP absence test retains its assertions; its subprocess now uses isolated Python so checkout files cannot shadow an installed package.

Manual offline test

With the development and learning test dependencies installed:

DIMOS_TRANSPORT=lcm LCM_DEFAULT_URL=memq:// uv run pytest -o addopts='' --import-mode=importlib -q \
  dimos/imitation/collection dimos/imitation/dataprep \
  dimos/imitation/test_datacollection_e2e.py

No checkpoint/model, inference, training, camera, robot or external provider was used. This verifies the dataset format writer, not a full LeRobot policy runtime. No CI conclusion or human acceptance is claimed; CI polling and benchmark investigation remain paused.

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.

1 participant