Go to file
邱棚 acd4ef84c3 feat: 实现速度和前轮转角的mpc控制 2024-10-24 11:56:23 +08:00
.idea feat: 第一次提交 2024-10-22 17:12:23 +08:00
img updated README with nicer gifs from latest implementation 2020-11-02 14:44:31 +00:00
mpc_pybullet_demo improve naming 2023-11-10 09:40:55 +00:00
notebooks feat: 实现速度和前轮转角的mpc控制 2024-10-24 11:56:23 +08:00
.gitignore update .gitignore 2020-12-10 21:11:37 +00:00
LICENSE Create LICENSE 2022-11-25 11:22:01 +00:00
README.md feat: 第一次提交 2024-10-22 17:12:23 +08:00
env.yml reformatted notebooks with black 2022-08-02 09:33:49 +01:00
requirements.txt feat: 第一次提交 2024-10-22 17:12:23 +08:00

README.md

mpc_python

I keep here my (old) notebooks on Model Predictive Control for path-following problems. Includes a Pybullet simulation to demo the controller. This mainly uses CVXPY as a framework. This repo contains code from other projecs, check them out in the special thanks section.

Contents

Usage

  • To run the pybullet demo:
python3 ./mpc_pybullet_demo/mpc_demo_pybullet.py
  • To run the simulation-less demo (simpler demo that does not use pybullet, useful for debugging):
python3 ./mpc_pybullet_demo/mpc_demo_nosim.py

In both cases the script will promt the user for enter before starting the demo.

The settings for tuning the MPC controller are in the mpc_config class.

Jupyter Notebooks

  1. State space model derivation -> analytical and numerical derivaion of the model

  2. MPC -> implementation and testing of various tweaks/improvements

  3. Obstacle Avoidance -> Using halfplane constrains to avaoid track collisions -> Sill work in progress!

Results

Racing car model is from: https://github.com/erwincoumans/pybullet_robots.

Results:

Requirements

The environment can be repoduced via conda:

conda env create -f env.yml
conda activate simulation

The dependencies for just the python scripts can also be installed using pip:

pip3 install --user --requirement requirements.txt

References & Special Thanks :