项目作者: arthur960304

项目描述 :
Model Predictive Control for an Autonomous Vehicle
高级语言: Python
项目地址: git://github.com/arthur960304/model-predictive-control.git
创建时间: 2021-03-23T07:17:53Z
项目社区:https://github.com/arthur960304/model-predictive-control

开源协议:

下载


Model Predictive Control of an Autonomous Vehicle

We utilize model predictive control to perform lane following and obstacle avoidance.




Agent trying to avoid obstacles.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Simulation Environment

Multi-Purpose-MPC

Built With

  • Python 3.6.10

  • do-mpc 4.1.1

  • numpy >= 1.16.2

  • matplotlib >= 3.1.1

Code Organization

  1. .
  2. ├── src
  3. ├── main.py # Execution part
  4. ├── MPC.py # the algorithm of model predictive control
  5. ├── model.py # simple bicycle model
  6. ├── globals.py # some variables that use globally
  7. ├── maps.py # generate a usable map from any picture (cited from matssteinweg)
  8. └── reference_path.py # generate reference path, waypoints for the assigned map (cited from matssteinweg)
  9. ├── result # GIF files of the results of two scenarios
  10. ├── maps # the picture of the map
  11. └── README.md

How to Run

There are 2 tasks you can try, which are lane following and obstacle avoidance, as shown in Results section

Modify the flag at line 95 in the main.py file if you want to switch between tasks

  1. use_obstacles = False

after that, just run

  1. python main.py

Results






Agent trying to follow desired trajectory.

Authors