Python implementation of MPPI (Model Predictive Path-Integral) controller to understand the basic idea. Mandatory dependencies are numpy and matplotlib only.
Model Predictive Path-Integral (MPPI) Control [G. Williams et al., 2018] is a promising sampling-based optimal control algorithm.
This repository is for understanding the basic idea of the algorithm.
numpy
, matplotlib
, notebook
are needed to run all scripts in this repository.mp4 movie writer
git clone https://github.com/MizuhoAOKI/python_simple_mppi.git
cd python_simple_mppi
poetry install
Run simulation
cd python_simple_mppi
poetry run python scripts/mppi_pathtracking.py
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi
poetry run jupyter notebook notebooks/mppi_pathtracking.ipynb
Run simulation
cd python_simple_mppi
poetry run python scripts/mppi_pathtracking_obav.py
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi
poetry run jupyter notebook notebooks/mppi_pathtracking_obav.ipynb
Run simulation to swing up a pendulum.
cd python_simple_mppi
poetry run python scripts/mppi_pendulum.py
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi
poetry run jupyter notebook notebooks/mppi_pendulum.ipynb
Run simulation of cartpole
cd python_simple_mppi
poetry run python scripts/mppi_cartpole.py
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi
poetry run jupyter notebook notebooks/mppi_cartpole.ipynb