Skip to content

jasonashton/CarND-PID-Control-Project

 
 

Repository files navigation

CarND-Controls-PID

Self-Driving Car Engineer Nanodegree Program


Basic PID (Proportional - Integral - Derivative) controller written in C++ for Udacity's Self Driving Car nanodgree.

PID Gif

The Proportional parameter controls how hard the steering wheel turns as a result of the cross-track error. If the car isn't turning hard enough, then the P value has to be increased.

The Derivative parameter controls residual error or offshoot. With just P value alone, the car would swing across the center line. By using the D value, we converge to the center.

The Integral parameter corrects for bias. In the lesson the example was if we didn't have straight wheels, we wouldn't be able to converge to center line. The I value corrects for not converging over time.

The results were found with manual tuning. By first starting with P, we're able to get the car to turn back to the center. Next we can add D to reduce oversteer. Lastly we can tune I to converge to a solution better.

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

About

Basic PID controller for Udacity's Self-Driving Car Nanodegree

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.6%
  • Other 0.4%