Implementation of a PID controller in C++
- 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 the project intro page in the classroom.
-
Componenent P (Proportional): This component is used to steer the car to the center line. The problem of using this parameter alone is to overshoot the line and potentialy leave the road. Video Example
-
Component I (Integral): This component is used to remove a potential bias induced by the front wheels, if they are not well aligned for example. This problem is called systematic bias. In our case, the car on the similator doesn't have any bias. Used alone, the car is goes in circle. Video Example
-
Component D (Differencial): This component is used to compensate the P parameter. It helps to do a smoother approach the the center line. Video Example
I tried to program the twiddle algorithm to fine tune the parameter, but it didn't work well. So, I finally tune the parameters manually by adding or substracting 0.05 for to P
and 0.5 for D
regarding the CTE
values.