SHOT-05: Battery compensation - 4 quick shots on a tired battery
- Your robot needs: Flywheel shooter.
- Starter bots that fit: goBILDA starter bot, REV DUO starter bot, Studica starter bot.
- Library version: v0.17.0 or newer.
- The docs it tests: Lesson 9: A shooter, a camera and a turret (for robots that shoot), Robot module (the robot in five files).
Why
Battery compensation is off by default because it is not yet proven on a real robot. This test is how we find out. It should help the wheel get back to speed after each shot on a low battery. If it makes no difference, or the wheel overshoots, we want to know: then we will change the default.
Safety
- Safety glasses. Nobody in front of the launcher. A clear space where shots land.
- Do not run a battery below 11.0 V on purpose: stop when it reaches about 11.3 V.
Setup
- SHOT-01 done:
kFandnominalVoltsinTunables.Launcher, andpublic static boolean batteryCompensation = true;there to turn it on. (WithoutnominalVolts, INIT saysbattery compensation on, nominalVolts not written: assuming 12.8 V: write yours from the Flywheel Finder.) - A battery at about 11.5 V under no load (run the robot for a while, or use an older battery). A full battery for step 6.
- A phone to film the Driver Station screen (the speed numbers), or a second person to write them.
- 8 pieces.
Steps
- With the 11.5 V battery: INIT, START, spin up (LB). Wait for READY.
- Fire 4 shots as fast as the launcher allows (hold RB). Film the launcher's measured RPM and target.
- Write the lowest RPM after each shot, and how long it took to get back to READY.
- Set
batteryCompensation = falseinTunables.Launcher, rebuild, and repeat steps 1-3 on the same battery. - Compare: with compensation on, does the wheel come back to speed faster?
- Put a full battery in, compensation back on (
true). Spin up: watch for an overshoot (the speed going more than 3% over the target).
Pass rule
With compensation on, the time back to READY after each shot is at least 10% shorter than with it off, and in step 6 the speed never goes more than 3% over the target.
Record
Write these down while you test. The report form has them as a list to fill in.
- battery voltage at the start of each run (on, off)
- for each of the 4 shots, on and off: lowest RPM, time back to READY (seconds)
- the biggest overshoot in step 6 (RPM)
- your
kF,nominalVolts, flywheel motor
If your robot is different
If your launcher fires slower than the wheel recovers, film single shots instead and say so. If you see no difference, that is a real result: report it (then leaving it off is fine). If the wheel overshoots after a battery swap, turn compensation off and tell us.
Report your result
Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.
Report resultNo reports for this test yet: yours would be the first. Every test's reports.
All tests · Next: SIM-02 Your own robot in the simulator, from Robot.java
Something wrong on this page? Tell us with a short GitHub form.