Hello. We are having difficulties with making our robot go forward correctly with the ramsete command. We tell it to go 3 meters, but it goes 1 meter.
When we get the setpoints for the velocities and it thinks that it has finished with a set point of 0m/s on the wheels. We also print out the pose, and the pose is correct with actually correct measurements.
Any help?
Also, here’s our github here if you’d like to take a look (Our ks, kv, and ka were done with the characterization tool).
I doubt it. We transferred this from some previous work this year on a temporary drive train before build got us the current one. On that previous version, the units were all in meters so I don’t see how it would’ve changed.
I would suggest reading the new Command Based Programming framework on docs.wpilib.org. It should help out a lot with structuring the code which would make it easier for you (or others) to troubleshoot. I’ll keep digging in the code to see if I can find anything.
You have made a units error. Taking the naive estimate of your top speed from your high-gear kV value (computed as 12 / kV) yields 300 units per second, and your low-gear yields 100 units per second.
You really should not just fudge the constants until it works. That’s not a good procedure. You need to fix your unit error and do it right, or your system will likely not be robust.
I can identify some points of potential error. Upon generating a characterization project, we changed some of the code there because it defaulted to brushed motors and when we changed it to brushless there was a problem with getting it to do anything so we changed some of the code to make it work better. We probably messed something up there.
This is likely because you used the SparkMax project preset instead of the Neo one. Since this seems to be a common point of confusion, we have renamed them to SparkMax (Brushed) and SparkMax (Brushless/Neo).
Okay, so we switched over to the neo project type and ran the data logger, however when we analyse the data it doesn’t have significant changes to the output. The kV is still way too low (it outputs as 0.122). We are using the default numbers in the data analyzer, should we be changing them?