Skip to content
Work in progress. This library and its docs are new and still changing, and some parts are not yet tested on a real robot. Something wrong or unclear?Tell us with a short GitHub form.

CTL-03: Switch the alliance during TeleOp (turned on by you)

medium prioritySimulator or real robotabout 20 minButtons and controls

  • Your robot needs: any robot.
  • Starter bots that fit: goBILDA starter bot, REV DUO starter bot, AndyMark Robits starter bot, Studica starter bot.
  • Library version: v0.17.0 or newer.
  • The docs it tests: The button menu: every way a button can work.

Why

If autonomous ran as the wrong alliance, the drivers can switch it in TeleOp, but only if the team turned it on. It takes 1.5 s on purpose, so it never happens by accident. With odometry on BIOBUZZ, the pose cannot be fixed, so the odometry aim must switch off until the pose is set again.

Safety

  • Real robot: the robot does not need to move. Sticks let go.

Setup

  • lib.switchAlliance(g1.start, g1.back); in libraryButtons(...) in Controls.java (START first, then BACK; see CTL-02 for where the method goes).
  • A camera with .goal(...) or odometry aim makes the test better (optional).

Steps

  1. INIT. Read the Switch alliance line. Choose BLUE (X). START.
  2. On gamepad 1, hold the small START button, then press BACK, and hold both for 1.5 s. Both gamepads buzz twice and the screen says Alliance now RED (was BLUE).
  3. Tap START, then BACK quickly: that is the debug lines, not a switch.
  4. With a camera: the goal it looks for switched to RED's.
  5. With odometry on BIOBUZZ (mirrorForRed = false): the note says the odometry aim is OFF until the pose is set. Hold START 1 s on the reset spot: it comes back.
  6. Without the switchAlliance line: holding START, then BACK does not switch (the INIT line says it is off).

Pass rule

The switch happens only after the full 1.5 s hold (1 of 1), never on a quick press (0 of 3 tries), and never without the switchAlliance line (0 of 1).

Record

Write these down while you test. The report form has them as a list to fill in.

  • what the screen said in steps 2 and 5
  • whether the goal (camera) followed
  • how many quick presses you tried in step 3

If your robot is different

With no camera and no odometry, steps 4 and 5 do not apply: say so. If you put the switch on other buttons, use those.

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 result

No reports for this test yet: yours would be the first. Every test's reports.

All tests · Next: HOOD-04 Hood at START, and the stick with no goal in view

Something wrong on this page? Tell us with a short GitHub form.