Skip to content

zoespot/CarND-PID-Control-Project

 
 

Repository files navigation

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program Term2 Project 4

My code built without error with cmake .. && make, and connected to GUI with ./pid .2 0.001 5. Final parameters for Kp, Ki, Kd are 0.2, 0.001 and 5 respectively. The vehicle successfully drove a lap around the track without leave the drivable portion of the track surface. The video recording is at

PID controlled run video

Reflection on PID components:

P component is proportional to cross track error (CTE). It compensates the devition of car position from its intended trajectory.

D component is propotional to the differential term of CTE. It reduces the oscillation with P component alone.

I component is propotional to the integral term of CTE. It reduces the bias from the trajectory with only P and D components.

Their effects meet my expectation when I manually tune the parameters. First, I found a suitable P value only with a few tries. Then I added nonzero D value to reduce the oscillation. Finally I used a small amount of I value to adjust the bias. The final hyperparmeters as above are achieved by a manual tuning foowling the twiddle method.

About

PID Controller Project for Udacity Self-driving Car nanodegree

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.6%
  • Other 0.4%