Table of Contents
MaPPI is a lightweight implementation of the Model Predictive Path Integral (MPPI) controller for autonomous navigation. It generates kinematically feasible trajectories by sampling control inputs and evaluating them against multiple cost functions (critics). Designed for real-time operation, obstacle avoidance and smooth motion planning, MaPPI is well-suited for embedded systems and resource-limited platforms.
By now you'll be probably asking yourself: What Makes MaPPI Different from the Nav2 MPPI Controller?
✅ Kinematic Bicycle Model – unlike the official Nav2 MPPI controller, MaPPI supports vehicle-like robots through a kinematic bicycle model (longitudinal velocity + steering inputs), not just differential/ackermann drive kinematics.
✅ Standalone C++ library – MaPPI is implemented as a portable, standalone C++ library, enabling use outside the ROS ecosystem without modification.
✅ ROS Noetic support – while Nav2 targets ROS 2, MaPPI also provides a C++ plugin for ROS 1 (move_base
) via nav_core::BaseLocalPlanner, ensuring compatibility with existing ROS 1 workflows.
✅ Model prediction is contained in MotionModel class – unlike the Nav2 MPPI controller, the trajectory generation is computed propagating the Motion Model ODE, which ensures direct compliance with your robot motion.
ONA prototype navigating through El Born - Barcelona using MaPPI.
This project is based on the nav2 MPPI controller, originally developed by Alex in mppic and adapted by Steve Macenski for nav2. If you plan to use MaPPI
please make sure to give some love to nav2 and mppic projects, which greatly influenced this work.
MaPPI
has been developed with the sole purpose of being able to use MPPI within ROS Noetic with different motion models than the ones offered in nav2. If you plan to use MPPI in ROS2 please use the official nav2 controller, which is a much better implementation (now optimized using Eigen).
MaPPI C++14 library:
- xtensor
- xtl
- costmap_2d (To-Do: erase this dependency, make it a templated library)
ROS (Noetic) wrapper:
Build dependencies
git clone https://github.com/xtensor-stack/xtl.git # install x template library (xtl)
cd xtl
cmake -DCMAKE_INSTALL_PREFIX=/usr/local
sudo make install
git clone https://github.com/xtensor-stack/xtensor.git # install xtensor library
cd xtensor
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
sudo make install
Clone the repository and build the package:
cd ~/catkin_ws/src
git clone https://github.com/fetty31/mappi.git
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make
Make sure your move_base
configuration includes:
<param name="base_global_planner" value="mappi/MPPIPlannerROS"/>
This allows move_base
to call the MPPIPlannerROS plugin, which wraps around the stand-alone MaPPI
library.
Modify config/mappi_local_planner.yaml
to adjust the controller behavior. Remember to add this to your move_base
launch:
<rosparam file="$(find mappi)/config/mappi_local_planner.yaml" command="load"/>
To-Do
mappi/
│── cfg/ # Dynamic Reconfigure definition
│── include/ # Header files for ROS functionality
│── mappi/ # MaPPI stand-alone C++ library
│── src/ # nav_core::BaseLocalPlanner definition
│── CMakeLists.txt # Build system configuration
│── mappi_plugin.xml # nav_core pluginlib definition
│── package.xml # ROS package metadata
└── README.md # This file