Self-Driving Car Engineer Nanodegree Program
###Kinetic Model: In this project, the state of vehicle is described by a simple kenetic bicycle model. The state variables are
- x: x coordinate
- y: y coordinate
-
$\psi$ : direction angle of the vehicle - v: linear velocity of the vehicle
The control variables are
- a: linear accelaration, usually related to throttle
- $ \delta$: steering angle.
Here's the state transfer equation of the vehicle in our model:
We will receive the reference waypoints from the simulator. Our goal is to find the optimal sequence of control signals [$a_1$,$\psi_1$,$a_2$,$\psi_2$ ...$a_n$,$\psi_n$] so that the trajectory of our vehicle is close to the reference waypoints. In short, at each time step, our controller will:
- receive reference trajectory
- find the optimal steer and accelaration to miminize cost
- actuate steer and accelaration for the first step
Here's the result of running the controller on the simulator. We can see the centrifugal cost forces the car to slow down when making turns. This enables car to drive at peak velocity of 85mph while stay in the center of the lane.
-
cmake >= 3.5
-
All OSes: click here for installation instructions
-
make >= 4.1(mac, linux), 3.81(Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
-
gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - [install Xcode command line tools]((https://developer.apple.com/xcode/features/)
- Windows: recommend using MinGW
-
- Run either
install-mac.sh
orinstall-ubuntu.sh
. - If you install from source, checkout to commit
e94b6e1
, i.e.Some function signatures have changed in v0.14.x. See this PR for more details.git clone https://github.com/uWebSockets/uWebSockets cd uWebSockets git checkout e94b6e1
- Run either
-
Ipopt and CppAD: Please refer to this document for installation instructions.
-
Eigen. This is already part of the repo so you shouldn't have to worry about it.
-
Simulator. You can download these from the releases tab.
-
Not a dependency but read the DATA.md for a description of the data sent back from the simulator.
- Clone this repo.
- Make a build directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./mpc
.