Skip to content

feat(messages): install and register external CDR messages - #4721

Open
TomCC7 wants to merge 3 commits into
cc/feat/cdr-message-packagesfrom
cc/feat/cdr-unit-external-messages
Open

TomCC7 wants to merge 3 commits into
cc/feat/cdr-message-packagesfrom
cc/feat/cdr-unit-external-messages

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

What this adds

Install an external .msg project as a Python package. Its cdrgen provider registers the generated types alongside built-in messages.

Base: #4366. This layer adds external message authoring and registration; it does not add another code generator or transport SDK.

How to test

From this PR's checkout, with uv and a C++ compiler:

uv venv .venv-msg-review --python 3.12
DIMOS_ALLOW_MISSING_COCKPIT=1 uv pip install --python .venv-msg-review/bin/python .
uv pip install --python .venv-msg-review/bin/python 'setuptools>=70' wheel
uv pip install --python .venv-msg-review/bin/python --no-build-isolation ./examples/external-messages
.venv-msg-review/bin/python -I examples/external-messages/demo_reading.py

No previous PR installation is needed. The example checks provider registration, shared Header identity and decoded DeviceReading values. Reinstall the external package and restart Python after changing definitions.

Full instructions. WIP: application integration follows in later layers.

CDR dependencies and TF conventions

The stack consumes published dimos-cdrgen 0.1.2 and the immutable CDR library fix. SDK #4774 now uses standard ROS TFMessage, TransformStamped and integer Time, with no per-driver TF codec callbacks or parallel public transform type. The external transforms library, validated by its complete std/no_std/serde and ARM verification gate, owns the frame tree, common-time lookup, interpolation and static history. Its atomic batch patch is pinned to 5ae9563de0c02638c04e393aadfad28444a4398e.

Combined-stack local validation: SDK 121, macros 22, mapper 101, MLS 135, local planner 91, follower 63, V4L2 6 and depth2depth 12 Rust tests; all 24 native/DimSim/port-contract acceptance tests pass without skips. The mapper exchange includes Python CDR tf_static input; the follower exchange covers drive, arrival, a new goal and empty-path stop. Missing native binaries fail the dedicated job. RealSense passes cargo check --all-targets --features docs-only; device linking and hardware execution were not tested. Seven real source-staging layouts pass locked Cargo resolution. Native acceptance for tip cc463c163aed465f7c1d6808165bf640820b0182: workflow run. These are combined-tip results, with the SDK additionally tested standalone at its own layer.

Native Nix inputs use verified source archive f7723ad4d5b9aa5dfe63614b6b537d1ccc2d212e, SHA256 f90af8fa794a34d53ee9481c6d0bdb63138853b30f851d92960fd34224ff62b2. Full Nix builds remain unverified. SDK static edges persist after receipt; LCM/Zenoh do not acquire DDS transient-local durability from CDR. Existing Python mount publishers retain dynamic tf compatibility. Legacy modules remain explicitly pinned to SDK 0.1.0.

Stack #4776 preserves existing history and PR bases. Current main still has conflicts with the original stack; this change does not rebase onto main. No DimOS PR has been merged.

@github-actions github-actions Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go2 replay realtime (arm64)

Details
Benchmark suite Current: 086c166 Previous: ecc2b8f Ratio
peak memory 1591.996 MB 1570.996 MB 1.01
peak threads 353 threads 355 threads 0.99
network (transport) 2722.111 MB 2730.387 MB 1.00
disk write 1.52 MB 1.496 MB 1.02
instructions 115.235 G 115 G 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 23.43750% with 49 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/message_codegen/test_project_install.py 23.43% 48 Missing and 1 partial ⚠️
@@                       Coverage Diff                        @@
##           cc/feat/cdr-message-packages    #4721      +/-   ##
================================================================
- Coverage                         82.33%   82.33%   -0.01%     
================================================================
  Files                              1677     1678       +1     
  Lines                            156940   157004      +64     
  Branches                          13161    13166       +5     
================================================================
+ Hits                             129220   129266      +46     
- Misses                            24048    24075      +27     
+ Partials                           3672     3663       -9     
Components Coverage Δ
Tests 96.71% <23.43%> (-0.07%) ⬇️
Flag Coverage Δ
OS-macos-latest 76.27% <23.43%> (-0.01%) ⬇️
OS-ubuntu-24.04-arm 76.02% <23.43%> (-0.03%) ⬇️
OS-ubuntu-latest 76.37% <23.43%> (-0.02%) ⬇️
Py-3.10 76.25% <23.43%> (?)
Py-3.11 76.38% <23.43%> (-0.03%) ⬇️
Py-3.12 76.38% <23.43%> (-0.03%) ⬇️
SelfHosted-Large 32.15% <20.31%> (+<0.01%) ⬆️
SelfHosted-Linux 40.70% <20.31%> (-0.02%) ⬇️
SelfHosted-macOS 40.99% <20.31%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
dimos/message_codegen/test_project_install.py 23.43% <23.43%> (ø)

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@TomCC7
TomCC7 added this pull request to stack #4743 October 20, 2026 22:26
@TomCC7 TomCC7 changed the title feat(messages): build and install external CDR message projects feat(messages): install and register external CDR messages Oct 20, 2026
@TomCC7
TomCC7 marked this pull request as ready for review October 21, 2026 00:08
@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] No merge-blocking issue was identified. The installed external message flow passed provider registration, CDR roundtrip, and built-in type identity checks.

Summary

Adds a standalone external message project that reuses the built-in Header through dimos-cdrgen.

  • External Python projects can register messages that reuse DimOS types.
  • Editable message packages pick up definition edits after reinstalling.

TomCC7 explicitly documents that these examples require the matching review DimOS wheel; that requirement is intentional.

No actionable issues were found. No merge-blocking issue was identified in the reviewed changes.

Reviews (1) · Last reviewed commit: "Merge branch 'cc/review/cdr-preserve-leg..." · Reviewed by Greptile

@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 5032b12 to 085d09d Compare October 21, 2026 00:54
@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 0446dd3 to 67c50a0 Compare October 21, 2026 04:39
@TomCC7
TomCC7 force-pushed the cc/feat/cdr-unit-external-messages branch from 67c50a0 to 086c166 Compare October 21, 2026 18:43
@TomCC7
TomCC7 removed this pull request from stack #4743 October 22, 2026 18:51
@TomCC7
TomCC7 added this pull request to stack #4776 October 22, 2026 18:52

This branch was successfully deployed

1 active (outdated) deployment
cachix — 67c50a08 Deployed Oct 21, 2026 by TomCC7 via cachix-build #13732
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