Closed BrownGenius closed 1 year ago
Interestingly enough, I was browsing chiefdelphi and ran across this post: https://www.chiefdelphi.com/t/psa-balance-in-auto/429778
They have an autoBalance routine that is freely available to use, and it seems to have basically the same logic that we have now...albeit a little simpler: https://github.com/FRC3683/OpenAutoBalance/blob/main/java/autoBalance.java
So, I think we are on the right track...(or both are on the wrong track!).
This was tested on 2023-03-13 on both the practice and competition bot. It works flawlessly on the practice bot, but the competition bot is still unstable. It seems the competition bot is top heavy so very unstable when the charge station tilts in the other direction. It should be "good enough" and hopefully we'll have time to test it on Friday evening in Reading on a real charge station and fixed bumpers.
Hi Team,
At WPI, unfortunately, the bumpers were still too low to properly test the Dock & Engage routine. However, as a work around, we manually lowered the ramp so that we could at least test the autonomous routine. What we found is that, once on the ramp, the robot didn't seem to have enough power to drive up the ramp, and basically got stuck.
After digging into it further, I realized that the DriveStraightToDock command should not be using the DriveStraightPID. The DriveStraightPID tries to aim for a specific distance as well as keep the heading steady. However, for the DriveStraightToDock routine, we don't care about the distance, so the distance PID + slew limiter was preventing the robot from hitting the required velocity to climb the ramp.
In the interest of time, I decoupled DriveStraightToDock from DriveStraightPID. DriveStraightToDock now drives the robot at a fixed velocity, depending on the state it is in:
E.g.:
This code is untested, so, if we have time, we need to test/tweak these parameters to make sure they work on the competition bot.
Resolves #132