Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/omplPublic

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

Open
saahu27 wants to merge4 commits intopr-remove-omplapp-doc-updates
base:pr-remove-omplapp-doc-updates
Choose a base branch
Loading
fromvamp-state-space-integration

Conversation

@saahu27
Copy link
Contributor

@saahu27saahu27 commentedSep 30, 2025
edited
Loading

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 previousdemos/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:

  • Median planning time: 35 microseconds (Franka Panda on MotionBenchMaker dataset)
  • 100-1000x speedup vs. traditional collision checking
  • Single-core performance on consumer desktop CPUs

Implementation

VAMPStateSpace

The newompl::geometric::VAMPStateSpace template class extendsRealVectorStateSpace to provide SIMD-accelerated collision detection while remaining fully compatible with all OMPL geometric planners.

Usage:

// Create VAMP collision environmentvamp::collision::Environment<float> environment;environment.spheres.emplace_back(0.3,0.0,0.5,0.2);// x, y, z, radius// Create VAMP state space for Panda robotauto space = std::make_shared<ompl::geometric::VAMPStateSpace<vamp::robots::Panda>>(environment);// Use with standard OMPL SimpleSetupompl::geometric::SimpleSetupss(space);auto si = ss.getSpaceInformation();ss.setStateValidityChecker(space->allocDefaultStateValidityChecker(si));si->setMotionValidator(space->allocDefaultMotionValidator(si));// Standard OMPL workflowss.setStartAndGoalStates(start, goal);ss.setPlanner(std::make_shared<RRTConnect>(si));ss.solve(5.0);

Key Features:

  • Automatic Configuration: Joint limits set automatically from robot definitions
  • Custom Validators: SIMD-acceleratedStateValidityChecker andMotionValidator
  • Multiple Robots: Pre-configured support for Panda (Franka Emika), UR5, Fetch, and Baxter
  • Flexible Environments: Supports primitive obstacles (spheres, boxes, capsules) and point cloud environments via CAPT (Collision-Affording Point Tree)
  • Full OMPL Compatibility: Works seamlessly with all geometric planners, SimpleSetup, and benchmarking tools

Changes

Added:

  1. src/ompl/base/spaces/VAMPStateSpace.h (243 lines)

    • Template state space class for VAMP-enabled robots
    • CustomStateValidityChecker using vectorized collision detection
    • CustomMotionValidator using vectorized continuous collision checking
    • Automatic joint limit configuration from robot models
  2. demos/Vamp.cpp (330 lines)

    • Clean single-file demonstration program
    • --simple mode: Basic planning with RRTConnect
    • --benchmark mode: Performance comparison across multiple planners (RRTConnect, RRTstar, BITstar, PRM)
    • Compatible withompl_benchmark_statistics.py and Planner Arena
  3. tests/base/state_spaces.cpp (4 new tests)

    • State space creation and configuration validation
    • State validity checking tests
    • Motion validation tests
    • Multi-robot support verification
  4. Documentation

    • Updated release notes for OMPL 2.0.0beta
    • Added VAMP demo todemos.md
    • Added VAMPStateSpace tospaces.md
    • Comprehensive Doxygen documentation in header file

Removed:

  • demos/Vamp/ directory (old integration approach)
  • Associated VAMP documentation images

Modified:

  • CMake configuration withOMPL_BUILD_VAMP option (enabled by default)
  • GitHub Actions workflows for VAMP dependency handling

Demo Usage

# Build with VAMP support (enabled by default)cmake .. -DOMPL_BUILD_VAMP=ONmake# Run simple planning demonstration./demos/demo_Vamp --simple# Run benchmark comparison./demos/demo_Vamp --benchmark# Process benchmark resultsscripts/ompl_benchmark_statistics.py vamp_ompl_benchmark.log -d vamp_benchmark.db# Visualize at plannerarena.org or generate plotsscripts/ompl_benchmark_statistics.py -d vamp_benchmark.db -p plots.pdf

Architecture

VAMPStateSpace integrates VAMP into OMPL through three key components:

  1. State Space: ExtendsRealVectorStateSpace with robot-specific configuration
  2. State Validity Checker: Vectorized collision detection for individual states
  3. Motion Validator: Vectorized continuous collision detection for path segments

This design allowsany OMPL geometric planner to benefit from VAMP's acceleration without modification—simply swapRealVectorStateSpace forVAMPStateSpace.

Supported Robots

  • Panda (Franka Emika) - 7 DOF
  • UR5 (Universal Robots) - 6 DOF
  • Fetch - 7 DOF
  • Baxter - 7 DOF (per arm)

Testing

# Run all tests./test/test_base_state_spaces# Integration tests verify:# - State space configuration and bounds# - VAMP state validity checking# - VAMP motion validation# - Multi-robot compatibility

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.

Jaeyoung-Lim reacted with rocket emoji
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.
@saahu27saahu27 changed the base branch frommain topr-remove-omplapp-doc-updatesSeptember 30, 2025 19:50
@saahu27saahu27 requested review froma team andThodoris1999October 2, 2025 17:55
@saahu27saahu27force-pushed thepr-remove-omplapp-doc-updates branch 2 times, most recently fromd0733c1 to1e35da5CompareOctober 3, 2025 01:21
Copy link
Member

@mamollmamoll left a comment
edited
Loading

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.

saahu27 reacted with thumbs up emoji
Copy link
Member

@zkingstonzkingston left a 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!

Copy link

@claytonwramseyclaytonwramsey left a 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.

*
* This serves as a minimal working example for integrating VAMP with OMPL.
*/
voidrunSimpleDemo() {

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.

* @tparam Robot VAMP robot type (e.g., vamp::robots::Panda, vamp::robots::UR5)
*/
template<typename Robot>
classVAMPStateSpace :publicbase::RealVectorStateSpace {

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)?

#include<ompl/base/SpaceInformation.h>

// VAMP includes
#include<vamp/collision/environment.hh>

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?

Copy link
ContributorAuthor

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

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?

Copy link
ContributorAuthor

@saahu27saahu27Oct 23, 2025
edited
Loading

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()));

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@mamollmamollmamoll left review comments

@zkingstonzkingstonzkingston left review comments

@Thodoris1999Thodoris1999Awaiting requested review from Thodoris1999

+1 more reviewer

@claytonwramseyclaytonwramseyclaytonwramsey requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@saahu27@mamoll@zkingston@claytonwramsey

[8]ページ先頭

©2009-2025 Movatter.jp