Skip to content

ZhihuiTian/CarND-PID-Control-Project

 
 

Repository files navigation

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program


Dependencies

Basic Build Instructions

  1. Clone this repo.
  2. Make a build directory: mkdir build && cd build
  3. Compile: cmake .. && make
  4. Run it: ./pid.

Tips for setting up your environment can be found here

Editor Settings

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)

Code Style

I am using Eclipse style file from Google to stick to Google's C++ style guide.

Project Instructions and Rubric

Describe the effect each of the P, I, D components had in your implementation.
  • 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.

    High D value

  • I

    I am using 0 for I, because I did not find a suitable value for I.

Describe how the final hyperparameters were chosen.

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.5%
  • Other 0.5%