Self-Driving Car Engineer Nanodegree Program
- cmake >= 3.5
- make >= 4.1
- gcc/g++ >= 5.4
- uWebSockets == 0.13, but the master branch will probably work just fine
- Clone this repo.
- Make a build directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./pid
.
The value of Kp, Ki, and Kd was chosen by manually tuning. The tuning process is similar to twiddle but mixed with the human intelligence :D
The effect of the PID component is demonstrated by the following examples. The car drove on the same path with different coefficients.
When all the coefficients are zeros, the CTE increased indefinitely.
As we increased Kp, the CTE initially decreased. However, the car overshot the ideal trajectory and started to oscillate.
We also increased Kd. The car was able to stay on the track. Notice that there is a spike.
We also increased Ki. the amplitude of oscillation increased a bit. There is no steady state error in this case. However, if there was, Ki component would help correct this error.