Skip to content

C++ Implementation of MPPI-IPDDP (Model Predictive Path Integral - Interior Point Differential Dynamic Programming) and Testing with MPPI variants and Multiple Environments

Notifications You must be signed in to change notification settings

MC00614/mppi_ipddp_cpp

Repository files navigation

MPPI-IPDDP C++

Implementation of the MPPI-IPDDP in C++.

Key Features

  • Header only library solver
  • CPU multi-processing
  • Benchmark with MPPI variants and multiple environments
  • Collision Checker can be easily modified on demand
  • Easy custom model configuration

Usage

Download Dependency

Build Dependancy

EigenRand and autodiff need to be named as in CMakeLists.txt.

Runtime Only Dependancy

For testing in diffent environment, we use .npy maps from BARN Dataset.

Build with CMake

Note that EigenRand and autodiff need to be under mppi_ipddp_cpp.

git clone https://github.com/MC00614/mppi_ipddp_cpp.git
cd mppi_ipddp_cpp
mkdir build && cd build
cmake.. && make

For simple usage, refer example.cpp with Wheeled Mobile Robot in 2D environment.

Performance comparison with MPPI variants

Box Plot

Seconds Curvature
seconds curvature

Results for MPPI

MPPI Log-MPPI
MPPI Log-MPPI
Smooth-MPPI MPPI-IPDDP
Smooth-MPPI MPPI-IPDDP

To reproduce this, refer main.cpp with Specific Target and Number of Simulations

// Target: MPPI-IPDDP, Simulations: 10
./main MPPI-IPDDP 10

Graphical tool for plot can be found in graph (box.py, graph.py), which is written in Python.

Performance in Multiple Environments (BARN Dataset)

Map Conversion

(a) Original (b) Extend
original extend
(c) Inflate (d) Distance
inflate distance

Results

Metric MPPI Log MPPI Smooth MPPI MPPI IPDDP
$N_u$ 3200 3200 12800 1600
$𝜮𝒖$ 0.2 0.1 0.3 0.4
Success 97 97 91.3 95.7
Q1 Time 0.121522 0.169059 0.446100 0.274369
Q2 Time 0.139242 0.197344 0.511798 0.299426
Q3 Time 0.179549 0.232929 0.598198 0.346971
MSC 0.002528 0.003089 0.005856 0.000139

To test with 300 maps, use test_with_map.cpp with Specific Target

// Target: MPPI-IPDDP
./test_with_map MPPI-IPDDP

Future Works

  • GPU Acceleration
  • More general constraint handling in model
  • Custom implementation of diffential with dual number

About

C++ Implementation of MPPI-IPDDP (Model Predictive Path Integral - Interior Point Differential Dynamic Programming) and Testing with MPPI variants and Multiple Environments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published