{"id":25753809,"url":"https://github.com/mrgeislinger/self-driving-pid-controller","last_synced_at":"2026-05-13T11:34:53.258Z","repository":{"id":85568126,"uuid":"320688953","full_name":"MrGeislinger/Self-Driving-PID-Controller","owner":"MrGeislinger","description":"PID controller to automatically steer a simulated car. Based on Udacity's Self-Driving Car Course PID project: https://github.com/udacity/CarND-PID-Control-Project","archived":false,"fork":false,"pushed_at":"2021-03-07T23:43:18.000Z","size":12142,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T06:30:39.046Z","etag":null,"topics":["autonomous-vehicles","pid","pid-algorithm","pid-control","pid-controller","self-driving-car"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrGeislinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-11T21:35:09.000Z","updated_at":"2024-09-04T10:10:43.000Z","dependencies_parsed_at":"2023-07-03T13:46:58.729Z","dependency_job_id":null,"html_url":"https://github.com/MrGeislinger/Self-Driving-PID-Controller","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MrGeislinger/Self-Driving-PID-Controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGeislinger%2FSelf-Driving-PID-Controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGeislinger%2FSelf-Driving-PID-Controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGeislinger%2FSelf-Driving-PID-Controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGeislinger%2FSelf-Driving-PID-Controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrGeislinger","download_url":"https://codeload.github.com/MrGeislinger/Self-Driving-PID-Controller/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrGeislinger%2FSelf-Driving-PID-Controller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32980819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T11:31:52.688Z","status":"ssl_error","status_checked_at":"2026-05-13T11:31:52.072Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-vehicles","pid","pid-algorithm","pid-control","pid-controller","self-driving-car"],"created_at":"2025-02-26T15:29:24.358Z","updated_at":"2026-05-13T11:34:52.256Z","avatar_url":"https://github.com/MrGeislinger.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\n## Project Introduction\n\n\u003e Implements a PID controller in C++ to maneuver the vehicle around the track. The simulator provides the cross track error (CTE) and the velocity (mph) in order to compute the appropriate steering angle.\n\n## Results\n\n![S](images/finalize_parameters_example_run.gif)\n\u003e Sped up example of final parameter run (no dangerous manuevers)\n\n### PID Algorithm\n\nA PID controller uses three parameters to adjust steering; **P** (\"proportional\"), **I** (\"integral\"), **D** (\"differential\"). Together, these parameters can be adjusted to better steer the vehicle based on the associated errors measured in real-time.\n\nThe **P** parameter causes the vehicle to steer in proportion to the vehicles's distance from the lane center (CTE). If the vehicle is too far in a direction, it will more drastically correct its steering. If the vehicle is only slightly too far in a direction, it will only slightly correct its steering.\n\nThe **I** parameter corrects the bias in the CTE (such as steering drift). Without this term, the controller can have a difficult time reaching its ideal position.\n\nThe **D** parameter counters the controller to overshoot the desired position due to the **P** parameter. This parameter allows the vehicle to more smoothly the desired position.\n\n### Choosing PID Parameter Coefficients\n\nCoefficients were determined with trial and error methods until the vehicle could reasonably move around the track safely.\n\nThe final values were P=`-0.10`, I=`-0.0001`, and D=`-1.50`(with a throttle of `0.3`).\n\n* **P**: Many runs saw a too slight of an overcorrection. This meant the parameter needed to be increased in magnitude.\n* **I**: This parameter didn't needto be very large since it appears there was little bias in the system.\n* **D**: This parameter was a very important one to counteract the **P** parameter. In initial tests, the **D** parameter was accidentally set to `0` and the vechicle would frequently overshoot its desired position (center of the lane). After adjusting and re-adjusting the parameter, the vehicle does a better job in more smoothly correcting the steering.\n\n## Set Up: Basic Build Instructions\n\n1. Clone this repo.\n2. Make a build directory: `mkdir build \u0026\u0026 cd build`\n3. Compile: `cmake .. \u0026\u0026 make`\n4. Run it: `./pid`. \n\n---------\n\n## Dependencies\n\n* cmake \u003e= 3.5\n * All OSes: [click here for installation instructions](https://cmake.org/install/)\n* make \u003e= 4.1(mac, linux), 3.81(Windows)\n  * Linux: make is installed by default on most Linux distros\n  * Mac: [install Xcode command line tools to get make](https://developer.apple.com/xcode/features/)\n  * Windows: [Click here for installation instructions](http://gnuwin32.sourceforge.net/packages/make.htm)\n* gcc/g++ \u003e= 5.4\n  * Linux: gcc / g++ is installed by default on most Linux distros\n  * Mac: same deal as make - [install Xcode command line tools]((https://developer.apple.com/xcode/features/)\n  * Windows: recommend using [MinGW](http://www.mingw.org/)\n* [uWebSockets](https://github.com/uWebSockets/uWebSockets)\n  * Run either `./install-mac.sh` or `./install-ubuntu.sh`.\n  * If you install from source, checkout to commit `e94b6e1`, i.e.\n    ```\n    git clone https://github.com/uWebSockets/uWebSockets \n    cd uWebSockets\n    git checkout e94b6e1\n    ```\n    Some function signatures have changed in v0.14.x. See [this PR](https://github.com/udacity/CarND-MPC-Project/pull/3) for more details.\n* Simulator. You can download these from the [project intro page](https://github.com/udacity/self-driving-car-sim/releases) in the classroom.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgeislinger%2Fself-driving-pid-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrgeislinger%2Fself-driving-pid-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrgeislinger%2Fself-driving-pid-controller/lists"}