Add GPU MegaParticles 6-DoF SE(3) relocalization demo#104
Merged
Conversation
Push the SE(2) MegaParticles demos up to full 6-DoF poses: a flying sensor in a 3D voxel world, range scans scored against a GPU 3D Euclidean distance field (built with the JFA-3D from comparison_esdf_3d.cu), quaternion-based Gauss-Newton SE(3) per-particle corrections (right-perturbation: world-frame translation, body-frame rotation), neighbor-consensus Stein motion, posterior smoothing, and recovery after a hidden kidnap and scan blackout. In 6-DoF a dense neighbor grid is combinatorially infeasible, so the explicit p-stable LSH neighbor index from gpu_megaparticles_lsh.cu is generalised to the 6-D pose feature (x, y, z, s*rotation-vector) and becomes essential rather than optional -- neighbor consensus stays O(L) per particle independent of pose-space dimension. A 64K local bootstrap MCL tracks well before the kidnap but cannot relocalize (5.97 m post-kidnap RMSE); the 1M-particle 6-DoF MegaParticles path re-seeds globally uniform over SE(3) during the blackout and re-localizes the hidden kidnap to 0.22 m / 1.9 deg, reacquiring in 0 frames. ~13.9 ms/step.
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
MegaParticles-style 6-DoF / SE(3) Monte Carlo relocalization — the SE(2) MegaParticles demos (
gpu_megaparticles_stein_mcl,gpu_megaparticles_lsh) pushed up to full 6-DoF poses. A flying sensor moves through a 3D voxel world; range scans are scored against a GPU 3D Euclidean distance field (built with the JFA-3D fromcomparison_esdf_3d.cu), particles take quaternion-based Gauss-Newton SE(3) steps (right-perturbation: world-frame translation, body-frame rotation), neighbor-consensus Stein motion pulls the cloud together, and the filter recovers after a hidden kidnap and scan blackout.The key point: in 6-DoF a dense neighbor grid is combinatorially infeasible, so the explicit p-stable LSH neighbor index from #101 is generalised to the 6-D pose feature
(x, y, z, s·rotation-vector)and becomes essential rather than optional — neighbor consensus staysO(L)per particle independent of pose-space dimension. This is the natural continuation of the #86 → #101 localization line.Two filter paths run side by side: a 64K local bootstrap MCL that tracks well before the kidnap but has no support at the hidden relocated pose, and the 1M-particle 6-DoF MegaParticles path that re-seeds globally uniform over SE(3) during the blackout (the honest "lost → search everywhere" relocalization behaviour) and re-localizes the instant scans return.
This is a repo-sized SE(3) demonstration of the MegaParticles ideas, not a full reproduction of Koide et al.'s system (no GICP distribution-to-distribution scoring, no iterative LSH neighbor lists, no full posterior backend). The honest scope: 6-DoF poses, a 3D distance-field range likelihood, an explicit 6-D p-stable LSH neighbor consensus, and hidden-kidnap relocalization.
Results
Before the kidnap both paths track tightly (~0.14 m / 2.5°). After the hidden kidnap the local bootstrap stays tied to the stale mode, while the 6-DoF MegaParticles path relocalizes globally over SE(3) as soon as scans return.
Test plan
cmake .. && make gpu_megaparticles_6dof -j$(nproc)builds clean./bin/gpu_megaparticles_6dofruns end-to-end, writes the GIFgit diff --checkclean (no whitespace errors)