- Notifications
You must be signed in to change notification settings - Fork657
Vamp state space integration#1325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:pr-remove-omplapp-doc-updates
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This commit introduces ompl::geometric::VAMPStateSpace, a new state spacethat integrates VAMP (Vector-Accelerated Motion Planning) for high-performancecollision detection and motion validation using SIMD instructions.Key Features:- SIMD-accelerated collision detection (AVX2/NEON) for manipulator robots- Support for Panda, UR5, Fetch, and Baxter robots- Automatic joint limit configuration from robot definitions- Vectorized state validity checking and motion validation- CAPT (Collision-Affording Point Tree) support for point cloud environments- Compatible with all OMPL geometric plannersImplementation:- New state space: src/ompl/base/spaces/VAMPStateSpace.h- Demo program: demos/Vamp.cpp (--simple and --benchmark modes)- Integration tests: 4 tests in tests/base/state_spaces.cpp- CMake integration with OMPL_BUILD_VAMP option (enabled by default)Documentation:- Updated release notes for OMPL 2.0.0beta- Added VAMP demo to demos.md- Added VAMPStateSpace to spaces.md- Comprehensive Doxygen documentation in source filesReplaces old demos/Vamp/ directory structure with clean single-file demo.Reference: Thomason, Kingston, Kavraki. 'VAMP: Motions in Microsecondsvia Vectorized Sampling-Based Planning.' arXiv:2309.14545, 2024.
d0733c1 to1e35da5CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
mamoll left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Looks much better!
I'd keep some of the visualization code to visualize the paths from VAMP demo.
Uh oh!
There was an error while loading.Please reload this page.
zkingston left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Small comments but like much better!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
claytonwramsey left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Overall pretty good, but some small changes desired. My main issue is that a lot of the documentation seems redundant and is completely incorrect in some cases.
Uh oh!
There was an error while loading.Please reload this page.
| * | ||
| * This serves as a minimal working example for integrating VAMP with OMPL. | ||
| */ | ||
| voidrunSimpleDemo() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Do we have any visualization or other way to check that this is all correct? I want to make sure we don't have the robot accidentally phasing through obstacles.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| * @tparam Robot VAMP robot type (e.g., vamp::robots::Panda, vamp::robots::UR5) | ||
| */ | ||
| template<typename Robot> | ||
| classVAMPStateSpace :publicbase::RealVectorStateSpace { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
usingRealVectorStateSpace isn't the worst choice in the world, but it means that you're pinned to a lot of slightly-incompatible decisions. Maybe avoid inheriting everything so you can have floats instead of constantly converting between doubles and floats (among other things)?
Uh oh!
There was an error while loading.Please reload this page.
| #include<ompl/base/SpaceInformation.h> | ||
| // VAMP includes | ||
| #include<vamp/collision/environment.hh> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
maybe add some#ifdef gating to give a friendly error in case people accidentally include this header without the optional VAMP dependency?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
you’re right that our demos/tests only include this header under OMPL_HAVE_VAMP. However, the header itself is installed and can be included by downstream users even when OMPL was built without VAMP. In that case they’d hit errors.
I added a simple guard so users get a clear, actionable error if they include this header without the optional dependency:
// at the top of VAMPStateSpace.h, right after the include guard#include"ompl/config.h"#if !OMPL_HAVE_VAMP#error "ompl::geometric::VampStateSpace requires OMPL built with VAMP (OMPL_HAVE_VAMP=ON)."#endif
| // Verify CAPT collision checking works | ||
| base::ScopedState<>state(space); | ||
| state.random(); | ||
| si->isValid(state.get());// Should execute without errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why should we believe that a random state should always be valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We don’t assume random states are valid in these tests. We only verify that the validity pipeline executes without crashing.
If preferred, I can adjust the test to:
Assert true only for empty environments: BOOST_CHECK(si->isValid(state.get()));
Uh oh!
There was an error while loading.Please reload this page.
VAMP Integration: VAMPStateSpace for SIMD-Accelerated Motion Planning
Overview
This PR integratesVAMP (Vector-Accelerated Motion Planning) into OMPL through a new state space,
ompl::geometric::VAMPStateSpace. VAMP leverages CPU SIMD instructions (AVX2/NEON) to perform collision checking and forward kinematics orders of magnitude faster than traditional methods, achieving planning speeds in themicroseconds range for manipulator robots.Note: This PR replaces the previous
demos/Vamp/directory with a cleaner state space-based design.What is VAMP?
VAMP (Vector-Accelerated Motion Planning) usesvectorized instructions to process multiple robot configurations simultaneously, enabling massively accelerated collision detection. By exploiting ubiquitous CPU SIMD capabilities, VAMP's RRT-Connect achieves:
Implementation
VAMPStateSpace
The new
ompl::geometric::VAMPStateSpacetemplate class extendsRealVectorStateSpaceto provide SIMD-accelerated collision detection while remaining fully compatible with all OMPL geometric planners.Usage:
Key Features:
StateValidityCheckerandMotionValidatorChanges
Added:
src/ompl/base/spaces/VAMPStateSpace.h(243 lines)StateValidityCheckerusing vectorized collision detectionMotionValidatorusing vectorized continuous collision checkingdemos/Vamp.cpp(330 lines)--simplemode: Basic planning with RRTConnect--benchmarkmode: Performance comparison across multiple planners (RRTConnect, RRTstar, BITstar, PRM)ompl_benchmark_statistics.pyand Planner Arenatests/base/state_spaces.cpp(4 new tests)Documentation
demos.mdspaces.mdRemoved:
demos/Vamp/directory (old integration approach)Modified:
OMPL_BUILD_VAMPoption (enabled by default)Demo Usage
Architecture
VAMPStateSpace integrates VAMP into OMPL through three key components:
RealVectorStateSpacewith robot-specific configurationThis design allowsany OMPL geometric planner to benefit from VAMP's acceleration without modification—simply swap
RealVectorStateSpaceforVAMPStateSpace.Supported Robots
Testing
References
This integration brings state-of-the-art SIMD-accelerated motion planning to OMPL through a clean, extensible state space design that works seamlessly with the existing OMPL ecosystem.