Skip to content

A simple implementation of Information-Theoretic Model Predictive Path Integral controller for 2D kinematic systems

License

Notifications You must be signed in to change notification settings

Mechazo11/mppi-python

Repository files navigation

License: MIT

A Simple Python Implementation of Information-Theoretic Model Predictive Path Integral Controller

A simple python implementation of Information-Theoretic Model Predictive Path-Integral (MPPI) controller introduced by G. Williams et al. in their 2018 paper. This project is based on the work by Mizuho Aoki but contains the following modifications

  • Notebook to generate and visualize custom trajectories
  • JIT acceleration of cost function evaluation using Numba.
  • Ideal-Differential Drive Kinematic model
  • Both stage and terminal costs implemented as simple quadratic const function.

This work was part of my final project for EE 7500: Model Predictive Control class taught by Dr. Xiangyu Meng at Louisiana State University.

Supported Dynamics models

  • Ideal Differential Drive: See my project report in pdfs_notes for more details
  • Ideal Bicycle model --> Head over to to Mizuho's repository.

Video demonstrations

  • Oval path with circular obstacles
oval_with_obs.mp4
  • Figure-8 path.
figure_eight.mp4

Setup

  • Clone this repo, create a mamba (or conda enviornment) and install the required dependencies
mamba create --name ee7500_proj --clone base
mamba activate ee7500_proj
mamba install ipykernel numpy pandas matplotlib seaborn numba

Optional

  • ffmpeg
    • mp4 movie writer

    • installation details
      • For Ubuntu Users
        • sudo apt-get update
        • sudo apt-get -y install ffmpeg
      • For Windows Users
        • Install scoop
        • scoop install ffmpeg
      • For macOS Users
      • Check the official website if necessary

Usage

  • To see the differential drive model in action run either mppi_ee7500_proj_oval.ipynb or mppi_ee7500_proj_figure_eight.ipynb notebooks.
  • To visualize or create custom paths, use the traj_gen.ipynb.
  • To add new dynamics models see the ./scripts/diffdrive.py.
  • To add/modify cost functions/distribution sampling see the ./scripts/mppi.py.
  • Various plotting and computational utility functions are in ./scripts/utils.py.

References

  1. G. Williams et al. "Information-Theoretic Model Predictive Control: Theory and Applications to Autonomous Driving"

Other notable projects

About

A simple implementation of Information-Theoretic Model Predictive Path Integral controller for 2D kinematic systems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published