Add GPU online 3D SLAM with switchable loop constraints#105
Merged
Conversation
Wire the switchable-constraint SE(3) back-end (#98) into the online sliding-window front-end (#63): a robot streams 420 SE(3) poses, true and false loop closures arrive incrementally, and the back-end has to decide on each loop the moment it appears. Per-loop switch variables are re-minimised in closed form alongside a sliding-window Gauss-Newton solve, so a false loop is switched off as soon as its residual blows up. Two back-ends run lockstep on the same streamed edge set: - plain online (every loop weight 1): false loops yank the live estimate, final RMSE 9.10 m - switchable online (per-loop switches optimised live): all 21 injected false loops rejected as they arrive, final RMSE 0.29 m Sliding-window-aware SE(3) GN+PCG with per-window anchor pin and active masking, closed-form damped switch update (asymmetric off-fast/on-slow), and an iSAM-style global pass when a loop fires. ~16 ms/step both back-ends.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Online 3D SLAM with a switchable-constraint sliding-window back-end — the other 3D SLAM follow-up flagged in the handoff. It fuses two existing demos into the harder online setting:
gpu_online_slamgave a 2D sliding-window pose-graph optimiser that runs as frames stream in (+ iSAM-style global pass on loop), but assumed every detected loop was correct.gpu_pose_graph_slam_3d_switchablegave a full SE(3) back-end that rejects bad loops with per-loop switch variables (Sünderhauf & Protzel, IROS 2012), but as a one-shot batch solve over a frozen graph.The interesting and honest case is the combination: a robot streams poses, and true and false loop closures arrive incrementally — there is no chance to look at the whole graph and trim the worst loops after the fact. Each frame the per-loop switches are re-minimised in closed form alongside a sliding-window SE(3) Gauss-Newton solve, so a false loop is switched off the moment its residual blows up and a true loop earns its weight back over a few iterations. A global pass propagates a good loop's correction across the whole trajectory when one fires.
Two back-ends run lockstep on the same streamed edge set, differing only in whether switches are active:
Results
420 streamed SE(3) poses, sliding window W=80 + global pass on loop, 213 true loops (GT proximity) and 21 gross false loops injected on a schedule.
Implementation notes
active_lo/active_himasking in assemble / matvec / preconditioner, per-window anchor pin (anchor_pose_kernel), edges to fixed poses contribute as constants.src/gpu_online_slam_3d_switchable.cu. Reusescuda_check.cuh,cuda_blas.cuh,cuda_video.h.Test plan
cmake .. && make gpu_online_slam_3d_switchable— builds clean (no warnings)./bin/gpu_online_slam_3d_switchableruns end-to-end (~10 s), prints plain 9.10 m vs switchable 0.29 m, 21/21 false loops rejectedgit diff --checkclean; squash diff touches only its four files (CMakeLists.txt, plan.md, readme.md, src/gpu_online_slam_3d_switchable.cu)