I’m trying to use the Amogo-Dogo Ez-Template to program my auton.
Are there any tutorials for it or should I just open it right up and mess around.
Also is there a different template I should use?
I just want to have slew and pid control on my motors.
If you go to the original EZ-Template GitHub they outline the process of configuring it for your bot. https://github.com/EZ-Robotics/EZ-Template
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
A new version of ez-template will be released shortly, I’ll make an update here when that happens. It’ll be soon (hopefully).
Is the issue I’m having something that’s going to be fixed or is it something on my end?
It’s just linter errors. You shouldn’t get errors when you build.
We’ve release a new version of EZ-Template today with documentation and tutorials. You can find the tutorials here Tutorials - EZ-Template
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.
Should I start a new thread?
Thank you for the feedback! I’ve added tutorials on how to tune constants, you can find that here Tuning Constants - EZ-Template
Can you describe what was inaccurate about it? What was the robot doing? Was it undershooting, overshooting or oscillating around a target?
Now that there’s a tutorial on how to do this, it’s still on topic
Thanks for making a tutorial!
I’ll test it again tommorow.
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
Oo I do like this. Something like this will be added when we get a chance, thanks!
did you really just ported the entire wpilib into vex
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:
It was an issue with EZ-Template. This has now been fixed in version 2.0.1, and the example project has been updated to 1.1.0.
Let me know how it goes!
Yay Thanks for the update
Just to clarify, was it not driving accurately an issue with the template? Or was the issue the PID values not changing?
I tested it again, the issue is it undershoots by almost exactly an inch every time.
I’m going to tune the PID values to see if that fixes it.
Tuning the constants should fix it. It’s hard to give generic constants that will work on everyone’s robot.
The drive motions currently are relative, so if every motion is undershooting a little it makes sense this would happen. Let me know how it goes
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