Other

项目介绍

MizuhoAOKI/python_simple_mppi 是一个托管在 GitHub 上的开源项目,主要使用 Jupyter Notebook 编写,采用 Other 许可证,目前获得 717 个 Star、69 次 Fork。

仓库全名
MizuhoAOKI/python_simple_mppi
开源许可证
Other
Star 数
717
Fork 数
69
未关闭 Issue
6

README 摘要

Simple MPPI Implementation with Python Model Predictive Path-Integral (MPPI) Control [[G. Williams et al., 2018]](#references) is a promising sampling-based optimal control algorithm. This repository is for understanding the basic idea of the algorithm. Dependency uv A simple and fast Python package manager. Refer to the official documentation for one-command installation. Only numpy, matplotlib, notebook are needed…

完整内容见 GitHub 原始 README 或本页 。

常见问题

python_simple_mppi 用什么语言开发?

主要使用 Jupyter Notebook 编写,采用 Other 许可证,目前有 717 个 Star。

python_simple_mppi 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 python_simple_mppi 的源码?

可以直接克隆仓库:git clone https://github.com/MizuhoAOKI/python_simple_mppi.git,默认分支为 master;安装与运行步骤见仓库 README。

python_simple_mppi 最近还在维护吗?

仓库最近一次更新为 5月4日,当前有 6 个未关闭 Issue;Star 数为 717,可作为社区活跃度的参考。

关于

Python implementation of MPPI (Model Predictive Path-Integral) controller to understand the basic idea. Mandatory dependencies are numpy and matplotlib only.

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

语言占比

Dockerfile
Jupyter Notebook
Python

Release

README

License: MIT uv Docker

Simple MPPI Implementation with Python

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.

pathtracking and obstacle avoidance demonstraion pathtracking demonstraion swinging up pendulum demonstraion swinging up pendulum demonstraion

Dependency

  • uv

    • A simple and fast Python package manager. Refer to the official documentation for one-command installation.
    • Only numpy, matplotlib, notebook are needed to run all scripts in this repository.
  • 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

Setup

[Option 1] Native environment

git clone https://github.com/MizuhoAOKI/python_simple_mppi.git
cd python_simple_mppi
uv sync

[Option 2] Docker environment

CLICK HERE TO EXPAND
  1. Install docker.

  2. Clone the project repository.

    cd <path to your workspace>
    git clone https://github.com/MizuhoAOKI/python_simple_mppi.git
    
  3. Run setup to build the docker image, launch the docker container and get into the bash inside. Building the image might take a few minutes.

    cd <path to your workspace>/python_simple_mppi
    docker compose run --rm dev
    

    This command will automatically build the Docker image if needed. Once the container starts, any changes made in the local repository on the host will be reflected inside the container, and vice versa.

Usage

Path Tracking

pendulum
Simple Path Tracking
  • 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
    
Path Tracking with Obstacle Avoidance
  • 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
    

Pendulum

pendulum
  • 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
    

CartPole

cartpole
  • 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
    

References

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

评论

暂无评论