Skip to content
/ mappi Public

MaPPI is a lightweight Model Predictive Path Integral (MPPI) controller for autonomous navigation.

Notifications You must be signed in to change notification settings

fetty31/mappi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏁 MaPPI 🏁

Table of Contents
  1. Disclaimer
  2. Installation
  3. Quick Start
  4. Approach
  5. Package Structure

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?

Distinctive Features

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.

Other Features

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.


Mappi at born

ONA prototype navigating through El Born - Barcelona using MaPPI.


Mappi at Gazebo

Maneuverability of MaPPI at simulation.

Disclaimer

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

Installation

Dependencies

MaPPI C++14 library:
  1. xtensor
  2. xtl
  3. costmap_2d (To-Do: erase this dependency, make it a templated library)
ROS (Noetic) wrapper:
  1. mappi
  2. sensor_msgs
  3. geometry_msgs
  4. nav_msgs
  5. std_msgs
  6. tf2
  7. costmap_2d
  8. dynamic_reconfigure
  9. nav_core
  10. std_srvs
  11. navfn (optional)

Build Instructions

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 

Quick Start

1. MaPPI as Local Planner

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.

2. Tuning Configuration Parameters

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"/>

Approach

To-Do

Package Structure

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

About

MaPPI is a lightweight Model Predictive Path Integral (MPPI) controller for autonomous navigation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published