Skip to content

feat(viewer): render generated CDR stamped geometry - #4652

Closed
TomCC7 wants to merge 1 commit into
cc/feat/cdr-browser-viewerfrom
cc/feat/cdr-rerun-viewer
Closed

TomCC7 wants to merge 1 commit into
cc/feat/cdr-browser-viewerfrom
cc/feat/cdr-rerun-viewer

Conversation

@TomCC7

@TomCC7 TomCC7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Rerun can subscribe explicitly to generated CDR channels and render PoseStamped/PointStamped without adding viewer methods to generated value classes. PoseStamped shows orientation axes and a text entity containing every Header/Pose field. Named frames and exact source nanoseconds are preserved; existing legacy discovery and transport defaults are unchanged.

Project: Message Encoding Refactor. Based on #4651; recording and domain/default cutover remain separate scopes.

Manual test

With this checkout installed normally into the active Python environment:

python examples/message-viewer/demo_cdr_rerun.py pose.rrd
rerun pose.rrd

Use a new output path. The exact example sends an actual generated PoseStamped through discovery-disabled loopback Zenoh/CDR, saves a real RRD and refuses to overwrite existing data. The viewer opens with axes and complete fields side by side, on source time 2023-11-14T22:13:20.123456789. The demo explicitly anchors its map frame at the origin; runtime bridges retain the producer's named frame and require the existing TF tree to locate it.

Runtime configuration

from dimos.core.cdr_transport import CdrTransport
from dimos.messages.geometry_msgs.msg import PoseStamped
from dimos.visualization.rerun.bridge import RerunBridgeModule

viewer = RerunBridgeModule(pubsubs=[], cdr_transports={
    "measured_pose": CdrTransport("measured_pose", PoseStamped, backend="zenoh"),
})
viewer.start()
# application lifetime
viewer.stop()

The producer uses its own matching transport instance. Bridge cleanup unsubscribes before stopping its owned transport, including failed startup. A source timeline is scoped to the incoming CDR message and cleared even when rendering fails. Zero source stamps remain zero. Walkthrough.

File changes by responsibility

Category Files Purpose
Viewer adapter 1 Stamped geometry, axes and complete field display outside generated types.
Existing bridge 1 Explicit owned CDR subscriptions and scoped source time; old pubsubs/defaults unchanged.
Tests 2 Frame/value/zero-time/lifecycle checks; run the exact example in isolated Python and inspect the actual RRD with the pinned CLI.
Manual example 1 Bounded real loopback exchange and no-overwrite RRD output.
Guide and CI 2 Embedded usage and installed-wheel acceptance in the existing workflow.

Validation and limits

At 70c08e85f4954e021111e55a11c0a5d1d35651e1: 13 focused/compatibility checks passed, including the exact real example and no-overwrite case. Strict typing passes on the adapter, bridge and example; applicable configured hooks pass. The main wheel builds. Actual sandboxed Chromium displayed the RRD's axes, full fields and nanosecond source timeline without page errors; screenshot provenance is recorded separately. Automated acceptance is not human review.

Only stamped geometry is covered in this slice. Generated TF/camera/cloud/map/domain adapters and default-blueprint cutover remain implementation work. No terminal CI result, hardware acceptance, Foxglove sign-in or production readiness is claimed.

The same 13 checks also passed against the built main wheel in isolated Python, with the installed package imported before loading checkout tests.

@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: 70c08e8 Previous: 17fdb6b Ratio
peak memory 1607.637 MB 1589.477 MB 1.01
peak threads 364 threads 350 threads 1.04
network (transport) 2722.547 MB 2730.079 MB 1.00
disk write 2.012 MB 1.707 MB 1.18
instructions 116.83 G 115.497 G 1.01

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

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
6377 2 6375 54
View the top 2 failed test(s) by shortest run time
dimos.codebase_checks.test_docs_branding::test_docs_use_current_branding
Stack Traces | 0.108s run time
def test_docs_use_current_branding() -> None:
        """Fail if any file under docs/ spells the brand "DimOS" instead of "dimOS"."""
        hits = find_old_branding()
        if hits:
            listing = "\n".join(
                f"  - {p.relative_to(DIMOS_PROJECT_ROOT)}:{lineno}: {line.strip()}"
                for p, lineno, line in hits
            )
>           raise AssertionError(f'Found "DimOS" in docs/:\n{listing}\n\nThe brand is spelled "dimOS".')
E           AssertionError: Found "DimOS" in docs/:
E             - docs/usage/visualization.md:177: DimOS environment:
E           
E           The brand is spelled "dimOS".

hits       = [(PosixPath('.../docs/usage/visualization.md'), 177, 'DimOS environment:')]
listing    = '  - docs/usage/visualization.md:177: DimOS environment:'

dimos/codebase_checks/test_docs_branding.py:43: AssertionError
dimos.core.test_build_native_modules::test_module_locks_pin_the_shared_code_as_it_is_now
Stack Traces | 5.18s run time
@pytest.mark.skipif(not _IN_GIT_CHECKOUT, reason="needs a git checkout to read refs")
    def test_module_locks_pin_the_shared_code_as_it_is_now() -> None:
        """Every module's pin on native/cpp or native/rust must hold this commit's tree.
    
        `nix flake lock` and `cargo build --locked` do not notice that the shared code
        moved -- they only check that the lock is complete -- so a change there can land
        while every module still builds against the revision before it. The revision is
        free to be older than HEAD; what must match is the content it pins.
        """
        stale = {
            _rel(lock): names
            for lock in _RELOCK.flake_locks()
            if (names := _RELOCK.stale_flake_inputs(lock))
        }
        stale |= {
            _rel(manifest): why
            for manifest in _RELOCK.cargo_manifests()
            if (why := _RELOCK.stale_cargo_pins(manifest))
        }
>       assert not stale, (
            "these modules pin shared code that is not the code in this commit, so they build "
            f"against the older version: {stale} -- push, run bin/relock-shared-flakes, commit"
        )
E       AssertionError: these modules pin shared code that is not the code in this commit, so they build against the older version: {'.../memory/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../realsense/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../v4l2/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../livox/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../pointlio/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../lidar/virtual_mid360/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../dim_slam/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../ray_tracing/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../mls_planner/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../local_planner/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../fancy/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../depth2depth_cloud/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../dds/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../native-modules/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5']} -- push, run bin/relock-shared-flakes, commit
E       assert not {'.../memory/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../realsense/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../v4l2/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../livox/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], ...}

names      = []
stale      = {'.../memory/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], '.../camera/realsense/...'dimos-module @ 6663bcb6e5'], '.../livox/rust/Cargo.toml': ['dimos-module @ 6663bcb6e5'], ...}
why        = ['dimos-module @ 6663bcb6e5']

dimos/core/test_build_native_modules.py:476: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@TomCC7 TomCC7 closed this Oct 20, 2026
@TomCC7
TomCC7 deleted the cc/feat/cdr-rerun-viewer branch October 20, 2026 18:10

This branch was successfully deployed

1 active deployment
cachix — 70c08e85 Deployed Oct 20, 2026 by TomCC7 via cachix-build-macos #13359
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