https://github.com/borisdayma/carnd-pid-control-project
Solution to the Udacity CarND PID Control Project
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Repository
Solution to the Udacity CarND PID Control Project
Basic Info
- Host: GitHub
- Owner: borisdayma
- Language: C++
- Default Branch: master
- Size: 75.2 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
CarND Controls PID Project
The present repository is my solution to the Udacity Controls PID Project.
Project development highlights
Here below are the main observations I had while developing this project:
- The PID is based on 3 separate parameters: proportional, integral and derivative. While debugging, it is important to observe the contribution of each parameter.
- It is important to initialize correctly each parameter, a good starting rule is by trying to have each contribution of PID of the same order of magnitude. Then, parameters are increased or decreased depending on the amplitude of the movements of the car.
- The proportional contribution corrects immediately any error.
- The integral contribution adds a larger correction if the error does not decrease to zero quickly enough (whether during turns or straight lines).
- The derivating contribution has a "smoothing" effect and decrease the oscillations. However if it is too high it will create noise and vibrations.
- Once we have found initial parameters that are good enough to stay on the track, we can auto-improve them by using the "twiddle" algorithm.
- The main difficulty with the "twiddle" algorithm is that we need to use an entire track to be able to compare errors. Otherwise, the straight portions of the track would always have the best results and it would not be possible to compare between iterations.
- We can take advantage of the optimization algorithm to auto-increase speed after a certain number of iterations, or when a target total error has been reached.
- The best parameters depend on the speed of the vehicle. We ran the twiddle algorithm for a few hours and recorded the coefficents Kp, Kd and Ki obtained to use them as initial values. We decreased them, while keeping them all proportional, because the car was having a lot of micro-movements, which probably lead to a smaller error due to the lower induced speed.
- It is interesting to note that the reference trajectory is not smooth at all, making the optimization of parameters more difficult.
Original Readme
Here below is the original readme of the project.
Dependencies
- cmake >= 3.5
- All OSes: click here for installation instructions
- make >= 4.1
- 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.shor./install-ubuntu.sh. - If you install from source, checkout to commit
e94b6e1, i.e.git clone https://github.com/uWebSockets/uWebSockets cd uWebSockets git checkout e94b6e1Some function signatures have changed in v0.14.x. See this PR for more details.
- Run either
- Simulator. You can download these from the project intro page in the classroom.
There's an experimental patch for windows in this PR
Basic Build Instructions
- Clone this repo.
- Make a build directory:
mkdir build && cd build - Compile:
cmake .. && make - Run it:
./pid.
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
Please (do your best to) stick to Google's C++ style guide.
Project Instructions and Rubric
Note: regardless of the changes you make, your project must be buildable using cmake and make!
More information is only accessible by people who are already enrolled in Term 2 of CarND. If you are enrolled, see the project page for instructions and the project rubric.
Hints!
- You don't have to follow this directory structure, but if you do, your work will span all of the .cpp files here. Keep an eye out for TODOs.
Call for IDE Profiles Pull Requests
Help your fellow students!
We decided to create Makefiles with cmake to keep this project as platform agnostic as possible. Similarly, we omitted IDE profiles in order to we ensure that students don't feel pressured to use one IDE or another.
However! I'd love to help people get up and running with their IDEs of choice. If you've created a profile for an IDE that you think other students would appreciate, we'd love to have you add the requisite profile files and instructions to ide_profiles/. For example if you wanted to add a VS Code profile, you'd add:
- /ide_profiles/vscode/.vscode
- /ide_profiles/vscode/README.md
The README should explain what the profile does, how to take advantage of it, and how to install it.
Frankly, I've never been involved in a project with multiple IDE profiles before. I believe the best way to handle this would be to keep them out of the repo root to avoid clutter. My expectation is that most profiles will include instructions to copy files to a new location to get picked up by the IDE, but that's just a guess.
One last note here: regardless of the IDE used, every submitted project must still be compilable with cmake and make./
GitHub Events
Total
Last Year
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Boris Dayma | b****a@g****m | 1 |
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0