[fix] validate RGBDSettings::depth_camera_id against the rig - #154
[fix] validate RGBDSettings::depth_camera_id against the rig#154slepichev wants to merge 1 commit into
Conversation
The RGBD branch of the Odometry constructor pushed depth_camera_id into the frustum graph without checking it. The default -1 means "not set", and static_cast<CameraId> turns it into a huge unsigned id; FrustumIntersectionGraph then registers it as a primary camera, so is_valid() passes and a camera index that names no camera reaches the odometry. Check the id the way the Multisensor branch right below already does - rejecting negatives and anything past the end of the rig - and name the offending value in the message. RgbdModeRequiresCudaBuild constructed with the default config, so in a USE_CUDA=OFF build it now hits this check before the mode switch and never sees the USE_CUDA message it asserts on. Give it a valid depth camera id, the same way MultisensorModeRequiresCunlsBuild already sets depth_camera_ids. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughRGBD initialization now validates ChangesRGBD validation
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to RGBD tracker construction now rejects invalid depth-camera IDs before registration and retains the expected CUDA-disabled behavior. Invalid-ID and non-CUDA coverage is included, with no active merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Test Results
cuVSLAM Evaluation KPIs
Artifacts |
The RGBD branch of the Odometry constructor pushed depth_camera_id into the frustum graph without checking it. The default -1 means "not set", and static_cast turns it into a huge unsigned id; FrustumIntersectionGraph then registers it as a primary camera, so is_valid() passes and a camera index that names no camera reaches the odometry.
Check the id the way the Multisensor branch right below already does - rejecting negatives and anything past the end of the rig - and name the offending value in the message.
RgbdModeRequiresCudaBuild constructed with the default config, so in a USE_CUDA=OFF build it now hits this check before the mode switch and never sees the USE_CUDA message it asserts on. Give it a valid depth camera id, the same way MultisensorModeRequiresCunlsBuild already sets depth_camera_ids.
Summary by CodeRabbit
Bug Fixes
Tests