Whenever I download and open it though I get errors on all the pros:: lines as well as the main.h lines. It says file not found, or pros is undeclared.
*I am the original person who posted the question btw, just that the other is my school account and this is my personal one
I downloaded the new one and set it up, I went in to auton.cpp and changed the *Set Drive P value to 1000 for both backward and forward.
Then I set the I and D values to 0.
I then ran the example drive PID auton where it goes forward 24, then back 12, and back 12 it was just as innacurate as with the default PID values. Which is surprising, because I expected it to way overshoot then oscillate like crazy.
The robot goes approximately 24, but not exactly 24. It would also turn slightly, so I’m going to play with the heading PID values too.
However I’m worried that changing the drive P value from 0.45 to 1000 had no effect.
Am I messing something up here?
Maybe I didn’t build and download the code correctly. I used the pros terminal to build the project, and then used the pros upload terminal command to upload the project.
When I ran the go forward 24, then go back 12, and go back another 12, It ended up behind the line where it started. So I’d say it overshot somewhere in there.
As a suggestion, you might consider adding a “Physical Robot Tuner” - help users determine their physical wheel size and wheel track for turning. I created one that moves the robot 8 feet, and allows the user to change the size of wheel that the code uses, likewise for turning
No; I have not yet ported the Command-based Programming model, but a fair bit of the odometry and motion profiling is there. At this point, I would say it is nearly functionally equivalent to OkapiLib.
I’ve never been brave enough, but I I believe WPI provides a program that will automatically tune PID parameters and otherwise help “characterize” a physical instance of a robot. Providing a program that allows one to manually tune parameters without recompiling can be an effective time-saver though. And someone brave enough could modify it to automatically tune:
You may want to vary the distance it travels to see if the error also varies. It may also be that changing your wheel diameter leads to more uniform behavior over a wider range of distances.
Alternatively, if you undershoot by an inch regardless of distance, tuning the PID values would be reasonable