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.
-
- A simple and fast Python package manager. Refer to the official documentation for one-command installation.
- Only
numpy,matplotlib,notebookare 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
uv syncCLICK HERE TO EXPAND
-
Install docker.
-
Clone the project repository.
cd <path to your workspace> git clone https://github.com/MizuhoAOKI/python_simple_mppi.git -
Run for the first time setup to build the docker image. Building the image might take a few minutes.
cd <path to your workspace>/python_simple_mppi docker build -t dev_mppi:v1.0 -f docker/Dockerfile . -
Launch the docker container and get into the bash inside.
cd <path to your workspace>/python_simple_mppi docker run -it -v .:/dev_ws/python_simple_mppi --name dev_mppi_container dev_mppi:v1.0 bashOnce the container starts, any changes made in the local repository on the host will be reflected inside the container, and vice versa.
-
Run simulation
cd python_simple_mppi uv run scripts/mppi_pathtracking.py -
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi uv run jupyter notebook --notebook-dir=. notebooks/mppi_pathtracking.ipynb
-
Run simulation
cd python_simple_mppi uv run scripts/mppi_pathtracking_obav.py -
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi uv run jupyter notebook --notebook-dir=. notebooks/mppi_pathtracking_obav.ipynb
-
Run simulation to swing up a pendulum.
cd python_simple_mppi uv run scripts/mppi_pendulum.py -
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi uv run jupyter notebook --notebook-dir=. notebooks/mppi_pendulum.ipynb
-
Run simulation of cartpole
cd python_simple_mppi uv run scripts/mppi_cartpole.py -
Run jupyter notebook if you would like to check mathematical explanations on the algorithm.
cd python_simple_mppi uv run jupyter notebook --notebook-dir=. notebooks/mppi_cartpole.ipynb
- G. Williams et al. "Information-Theoretic Model Predictive Control: Theory and Applications to Autonomous Driving"



