Skip to content

yahsiuhsieh/model-predictive-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

.
├── src                    
│   ├── main.py            # Execution part
│   ├── MPC.py             # the algorithm of model predictive control
│   ├── model.py           # simple bicycle model
│   ├── globals.py         # some variables that use globally
│   ├── maps.py            # generate a usable map from any picture (cited from matssteinweg)
│   └── reference_path.py  # generate reference path, waypoints for the assigned map (cited from matssteinweg)
├── result                 # GIF files of the results of two scenarios
├── maps                   # the picture of the map
└── 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

use_obstacles = False

after that, just run

python main.py

Results


Agent trying to follow desired trajectory.

Authors

About

Model Predictive Control for an Autonomous Vehicle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages