Self-Driving Car Engineer Nanodegree Program
- Describe the effect each of the P, I, D components had in your implementation.
The P, or "proportional", component had the most directly observable effect on the car's behavior. It causes the car to steer proportional (and opposite) to the car's distance from the lane center (which is the CTE) - if the car is far to the right it steers hard to the left, if it's slightly to the left it steers slightly to the right.
The D, or "differential", component counteracts the P component's tendency to ring and overshoot the center line. A properly tuned D parameter will cause the car to approach the center line smoothly without ringing.
The I, or "integral", component counteracts a bias in the CTE which prevents the P-D controller from reaching the center line. This bias can take several forms, such as a steering drift (as in the Control unit lessons), but I believe that in this particular implementation the I component particularly serves to reduce the CTE around curves.
- Describe how the final hyperparameters were chosen.
- Steer PID control
| Kp | Ki | Kd | Result |
|---|---|---|---|
| 2 | 0.01 | 0 | out of track |
| 0.2 | 0.001 | 0 | out of track |
| 0.2 | 0.0005 | 0.001 | out of track |
| 0.2 | 0 | 0.05 | out of track |
| 0.1 | 0 | 0.2 | out of track |
| 0.1 | 0 | 0.5 | out of track |
| 0.1 | 0 | 2 | OK w/o speed control |
| 0.1 | 0 | 5 | OK w/ speed control |
- Throttle PID control
| Kp | Ki | Kd | Result |
|---|---|---|---|
| 0.1 | 0.002 | 0 | speed vibration |
| 0.1 | 0.002 | 2 | speed vibration |
| 0.1 | 0.001 | 0.1 | OK |
- 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.shor./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 the project intro page in the classroom.
There's an experimental patch for windows in this PR
- 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)
Please (do your best to) stick to Google's C++ style guide.
Note: regardless of the changes you make, your project must be buildable using cmake and make!
More information is only accessible by people who are already enrolled in Term 2 of CarND. If you are enrolled, see the project page for instructions and the project rubric.