Open jtechau opened 1 year ago
Let's keep track of ideas and test results / notes in the description above.
We coded AutoBalance on the Lint2023 project to drive up if the robot is tilted up (to get up the charging station). We used power-based code, multiplying a P value (0.05 starting) by the robot angle. The steeper the angle, the faster it goes. This could create some overshoot problems, so we're thinking of ways to balance on the charge station more successfully. Some ideas (a few mentioned above):
Note to self 1/25/23: In the Lint 2023 code, we are calling everything in autonomous. I think we'll have to change where AutoBalance is called (ex: make it a click of a button when balancing at the end of a match).
Autobalance has been ported to the 2023 robot code.
Ideas to try:
Use the IMU gyro to determine the robot's angle. Check the measured angle vs. another inclination reading (e.g. phone app) while tipping the robot. Jar the robot to determine how the gyro-measured angle is affected by shock.
Use the IMU accelerometer to determine the robot's angle. Use the same analysis methodology used for the IMU gyro.
Use the measured robot inclination (e.g. gyro angle) as input to a simple P-loop to move the robot toward the high side. (Note: used P-value times angle)
Use the measured robot inclination to move the robot at constant speed toward the high side until the inclination starts to reduce. (Note: will be trying next)