Open Source Robotics

A curated collection of high-quality open source robotics projects, tools, and software to propel the robotics community forward.

Model Predictive Path Integral

  • Also called: MPPI, MPPI control, information-theoretic MPC, path integral MPC
  • Category: Control › Feedback control
  • Tags: model-predictive-control, sampling-based-control, optimal-control, gpu-computing, navigation

A sampling-based model predictive control method that simulates many randomly perturbed control sequences through a dynamics model and averages them, weighted by cost, to choose the next action.

Definition

Model Predictive Path Integral (MPPI) control is a sampling-based form of model predictive control developed by Grady Williams, Evangelos Theodorou and colleagues, with a widely cited 2016 demonstration on a small-scale autonomous rally car driven at high speed on a dirt track. Like other model predictive controllers, MPPI plans a sequence of control inputs over a short horizon, applies the first one, and replans at the next time step. What distinguishes it is how the plan is computed.

At each step, MPPI starts from the previous control sequence and generates a large number of perturbed versions of it by adding random noise. Each perturbed sequence is rolled out through a dynamics model to predict the resulting trajectory, and that trajectory is scored with a cost function. The new control sequence is a weighted average of all the samples, with weights that decrease exponentially with cost according to a temperature parameter. Low-cost samples dominate the average, while the update stays smooth.

The method comes from path integral control theory, which relates a class of stochastic optimal control problems to expectations over sampled trajectories. In practice, MPPI's main appeal is that it needs no gradients: the dynamics model and the cost function can be nonlinear, discontinuous or learned, as long as they can be evaluated many times. Rollouts are independent, so they parallelize well on GPUs.

The trade-offs are computational cost, which grows with the number of samples and the horizon length, and sensitivity to the noise level and temperature. With too little noise the controller explores poorly; with too much the commands become jittery, so smoothing of the sampled sequences or of the output is common.

Why it matters

MPPI lets robots plan with complex or learned dynamics models and with costs that are hard to differentiate, such as obstacle maps and terrain risk. Because its rollouts run in parallel, it can replan fast enough for ground vehicles, drones and legged robots operating in real time.

Key applications

  • High-speed and off-road autonomous driving
  • Local navigation for mobile robots, including the ROS 2 Nav2 stack
  • Agile quadrotor control
  • Planning with learned dynamics and world models
  • Manipulation and locomotion with non-smooth contact costs

In practice

A team using MPPI for outdoor navigation typically runs it on an onboard GPU, sampling many control sequences each cycle over a horizon of a few seconds. Each sequence is propagated through a vehicle model, either a kinematic or dynamic model or a learned forward dynamics model, and scored against a cost that combines progress toward the goal, obstacle and traversability costs, and control smoothness. Open-source implementations exist, including an MPPI controller in the ROS 2 Nav2 navigation stack. Most of the engineering effort goes into the cost function and the sampling parameters: teams tune the noise covariance and temperature in simulation, then check on hardware that the vehicle does not oscillate and that it reacts quickly to new obstacles.

Common misconceptions

  • MPPI is just random search — it uses randomness to explore, but its cost-weighted averaging is derived from stochastic optimal control theory
  • More samples always fix poor performance — a badly designed cost function or poorly tuned noise and temperature limit results regardless of sample count
  • MPPI does not need a model — it relies on a dynamics model to predict every rollout; only the model's gradients are unnecessary

Who should know this

  • Autonomous vehicle and mobile robot control engineers
  • Drone and quadrotor control developers
  • Researchers combining learned models with planning
  • Nav2 users configuring local controllers

Related technologies

  • Model Predictive Control
  • Nav2
  • Cross-Entropy Method
  • iLQR
  • Forward Dynamics Model
  • CUDA

Related terms

  • Model Predictive Control
  • Trajectory Planning
  • Reinforcement Learning

Related projects

  • Nav2: ROS 2 navigation stack with path planning and obstacle avoidance for mobile robots
  • DimOS: Python robotics runtime with agents, SLAM and teleop, no ROS required
  • ROS Motion Planning: One repo implementing 40+ classic and learning-based robot path planners as ROS plugins
  • MRPT: Comprehensive C++ toolkit for mobile robotics, SLAM, and sensor-based navigation
  • TurtleBot3: ROS packages for TurtleBot3 — the standard educational mobile robot platform
  • MuJoCo MPC: DeepMind's interactive real-time model predictive control framework for MuJoCo

This website requires JavaScript to function properly. Please enable JavaScript to explore our collection of open source robotics projects.