Skip to content

dimSLAM: enhanced cuVSLAM - #3632

Merged
jeff-hykin merged 219 commits into
mainfrom
jeff/feat/dim_slam
Sep 3, 2026
Merged

dimSLAM: enhanced cuVSLAM#3632
jeff-hykin merged 219 commits into
mainfrom
jeff/feat/dim_slam

Conversation

@jeff-hykin

@jeff-hykin jeff-hykin commented Aug 24, 2026

Copy link
Copy Markdown
Member

cuVSLAM enhanced with wheel odometry

next PR lets us run it on alfred

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change adds the Rust-backed dimSLAM module, a RealSense stereo demo, odometry-path visualization, and supporting registration. The infrared-only demo can fail to initialize visual odometry on a RealSense profile without a discoverable depth stream because camera-frame transforms are withheld even though the infrared streams are enabled.

Confidence Score: 4/5

The infrared-only RealSense demo is not reliable across supported camera profiles until its transform origin can be selected from an enabled stream.

The camera transform builder unconditionally selects a depth profile as its origin. When that profile is unavailable, it returns without publishing the infrared transforms required by dimSLAM.

Files Needing Attention: dimos/hardware/sensors/camera/realsense/camera.py

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex produced a proof for a posted P1 finding and linked to the review comment.
  • T-Rex produced a proof for another posted P1 finding and linked to the review comment.
  • T-Rex ran the infrared-only RealSense TF validation script and confirmed the expected camera links and frames when depth is exposed; no product code changes were made, and only the validation script and its output were created.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (2)

  1. dimos/hardware/sensors/camera/realsense/camera.py, line 496-499 (link)

    P1 Infrared-only camera transforms require depth

    _build_mount_edges() always selects the depth profile as its transform origin. The dimSLAM demo deliberately disables depth while enabling infrared; on a device/profile without a discoverable depth profile this returns before publishing either infrared mount or optical-frame transform. dimSLAM resolves its stereo-camera extrinsics through TF, so visual odometry cannot initialize. Select an enabled infrared profile as the origin when depth is unavailable.

    Artifacts

    Infrared-only RealSense TF validation script source

    • Authored Python validation parses the current sources and executes the exact RealSense profile and mount-edge methods against mocked device profiles, showing the tested configuration and assertions.

    Infrared-only RealSense TF validation command output

    • Captured output of the validation command from `/home/user/repo` with exit code 0, showing both infrared mount and optical TF edges exist when a depth profile is available.

    View artifacts

    T-Rex Ran code and verified through T-Rex

  2. General comment

    P1 Infrared-only RealSense TF setup still requires a depth device profile

    • Bug
      • _build_mount_edges() always resolves rs.stream.depth as its transform origin. If an infrared-only configuration runs on a device/profile without a discoverable depth stream profile, it logs that no depth stream exists and returns before publishing any infrared mount or optical TF edges.
    • Cause
      • The hard-coded depth origin lookup at camera.py:496 is unconditional, while the demo deliberately disables the depth stream and DimSlam consumes the remapped infrared camera frames using TF extrinsics against its rig frame.
    • Fix
      • Choose an enabled infrared stream as the origin when depth is disabled or unavailable (and retain depth as the preferred origin when present), then construct the infrared mount and optical edges from that origin.

    T-Rex Ran code and verified through T-Rex

Reviews (20): Last reviewed commit: "dim_slam: as_chunks over chunks_exact fo..." | Re-trigger Greptile

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
dimos/mapping/dim_slam/dim_slam.py 78.15% 26 Missing ⚠️
dimos/mapping/dim_slam/test_dim_odom_replay.py 97.46% 1 Missing and 1 partial ⚠️
@@            Coverage Diff             @@
##             main    #3632      +/-   ##
==========================================
+ Coverage   77.83%   77.84%   +0.01%     
==========================================
  Files        1329     1331       +2     
  Lines      126868   127014     +146     
  Branches    11035    11160     +125     
==========================================
+ Hits        98749    98879     +130     
- Misses      24970    24986      +16     
  Partials     3149     3149              
Flag Coverage Δ
OS-ubuntu-24.04-arm 74.50% <50.24%> (-0.05%) ⬇️
OS-ubuntu-latest 75.03% <50.24%> (-0.05%) ⬇️
Py-3.10 75.03% <50.24%> (-0.06%) ⬇️
Py-3.11 75.02% <50.24%> (-0.06%) ⬇️
Py-3.12 75.03% <50.24%> (-0.05%) ⬇️
Py-3.13 75.03% <50.24%> (-0.05%) ⬇️
Py-3.14 75.03% <50.24%> (-0.05%) ⬇️
Py-3.14t 75.03% <50.24%> (-0.05%) ⬇️
SelfHosted-Large 30.62% <97.46%> (+0.42%) ⬆️
SelfHosted-Linux 34.64% <25.31%> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
dimos/mapping/dim_slam/demo_dim_slam_realsense.py 78.57% <100.00%> (ø)
dimos/robot/all_blueprints.py 100.00% <ø> (ø)
dimos/utils/nvidia_env.py 21.35% <100.00%> (ø)
dimos/mapping/dim_slam/test_dim_odom_replay.py 97.46% <97.46%> (ø)
dimos/mapping/dim_slam/dim_slam.py 78.15% <78.15%> (ø)

... and 4 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.

@jeff-hykin
jeff-hykin marked this pull request as ready for review August 24, 2026 07:50
@github-actions github-actions Bot added ready-to-merge Required CI checks have passed on this PR and removed ready-to-merge Required CI checks have passed on this PR labels Aug 24, 2026
@jeff-hykin jeff-hykin changed the title dim_slam: one module wrapping the merged cuVSLAM+fusion binary dim_slam: cuVSLAM+fusion Aug 24, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Aug 24, 2026
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
@github-actions github-actions Bot added ready-to-merge Required CI checks have passed on this PR and removed ready-to-merge Required CI checks have passed on this PR labels Aug 24, 2026
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
Comment thread dimos/mapping/dim_slam/demo_cuvslam_realsense.py
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Aug 25, 2026
The __init__ lock was immediately replaced in main(), the max(hz, 1e-3)
guarded a config value that is never zero, and the poll docstring
repeated what now lives as comments at the negation and twist sites.
portal ships in the misc extra, so a top-level import breaks blueprint
validation tests in environments without it.
One derivation per crate instead of one vendored blob, so a dependency bump only
rebuilds what changed and the SDK variants share everything below cu_vslam_rs.

crate2nix reads the crate through the synthesized tree rather than the crate
directory, because the ../../../../native path dependency escapes the latter.
The module also has to be handed DEP_CUVSLAM_LIB_DIR explicitly: buildRustCrate
names those variables after the crate and cargo after the `links` key, so
build.rs would otherwise see nothing and emit no rpath, leaving a binary that
dies at startup on @rpath/libcuvslam.dylib.
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 1, 2026
Comment thread dimos/mapping/dim_slam/rust/Cargo.toml Outdated
Comment thread dimos/mapping/dim_slam/rust/src/msg_convert.rs
Comment thread dimos/mapping/dim_slam/rust/Cargo.toml
Comment thread dimos/mapping/dim_slam/rust/flake.nix
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 2, 2026
Build the Odometry and PointCloud2 messages as struct literals instead of
mutating a Default, replace the 6x6 covariance copy loop with a row-major
copy_from_slice, and inline to_isometry into its only caller.
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 2, 2026
@jeff-hykin jeff-hykin changed the title dim_slam: enhanced cuVSLAM dimSLAM: enhanced cuVSLAM Sep 2, 2026
A branch pin silently rolls forward; the tag names the exact release the
Cargo.lock rev belongs to.
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 2, 2026
@github-actions github-actions Bot added ready-to-merge Required CI checks have passed on this PR and removed ready-to-merge Required CI checks have passed on this PR labels Sep 2, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 2, 2026
dim_odom now publishes a py3-none-any placeholder alongside its three real
wheels, so the three supported targets no longer have to be spelled out here to
keep the group installable elsewhere. The placeholder raises ImportError and
test_dim_odom_replay already guards on importorskip; a platform tag outranks
`any`, so a real wheel still wins wherever one exists.
The dim_odom wheel is now versioned off the repository's release tag, so
the crate pin and the dependency specifier name the same release.
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 2, 2026
@github-actions github-actions Bot removed the ready-to-merge Required CI checks have passed on this PR label Sep 3, 2026
@github-actions github-actions Bot added the ready-to-merge Required CI checks have passed on this PR label Sep 3, 2026
@jeff-hykin
jeff-hykin added this pull request to the merge queue Sep 3, 2026
Merged via the queue into main with commit 9748dfd Sep 3, 2026
52 of 53 checks passed
@jeff-hykin
jeff-hykin deleted the jeff/feat/dim_slam branch September 3, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Required CI checks have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants