Self-Driving Car Engineer Nanodegree Program
- 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
- uWebSockets
- Run either
./install-mac.sh
or./install-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
- Simulator. You can download these from here .
- Clone this repo.
- Make a build directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./pid
.
Tips for setting up your environment can be found here
We've purposefully kept editor configuration files out of this repo in order to keep it as simple and environment agnostic as possible. However, we recommend using the following settings:
- indent using spaces
- set tab width to 2 spaces (keeps the matrices in source code aligned)
I am using Eclipse style file from Google to stick to Google's C++ style guide.
-
P
High P value : The line of the car is very unstable, and the car is swing left and right. At last the car will go out of the track very quickly.
Low P value : The car can not return to the center of the lane immediately.
-
D
High D value : The steering wheel is turning very fast.
-
I
I am using 0 for I, because I did not find a suitable value for I.
First I tried set P to 3 and the other values to 0. The car is swing left and right and go out of the track very quickly. I tried to reduce the value of P from 3 to 0.2, but the result is not good.
I started trying to increase the I value and found the car can not run straight from the beginning, so I gave up to optimizing the I value.
For D value, I gave it to 100 at first. The result is like the video below. My car's steering wheel is turning very fast. I think it will make the passengers in the car feel uncomfortable. Then I tried to reduce the D value to 3.
At last the final hyperparameters is below:
P : 0.2
D : 3
I : 0