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.

ODO-02: Set pose here - hold START 1 s on the reset spot

high prioritySimulator or real robotabout 20 minOdometry

Why

When TeleOp runs without an autonomous first, the robot does not know where it is. "Set pose here" fixes that with one held button. It must only work when the robot stands still, and never when a driver pairs a gamepad (START + A or START + B).

Safety

  • Real robot: the robot does not move in this test, but keep the sticks let go when you hold START.

Setup

  • A robot with an odometry line, and the reset spot in Tunables.Odometry (resetX, resetY, resetHeading, seen from your own drivers' wall). BIOBUZZ: also mirrorForRed = false, written once for the whole robot in Tunables.Aim (or in Tunables.Odometry if you have no Aim section).
  • Simulator: your own robot from Robot.java (./gradlew :sim:fromRobot -PteamCode=../TeamCode), or the odometry robot from lesson 7.
  • A tape measure (real robot).

Steps

  1. Put the robot on the reset spot (for example the start tile against your wall, facing the field). In the simulator, drag it there on the field map.
  2. INIT your TeleOp (with no autonomous before it). Read INIT's Set pose: hold G1 START 1 s at ... line.
  3. Hold gamepad 1's small START button for 1 second, sticks let go. Gamepad 1 buzzes twice and the Driver Station says Pose set: ....
  4. START the TeleOp. Drive about 4 ft away and back to the spot. Read the pose: it should be close to the reset spot.
  5. Push the left stick a little and hold START at the same time: it must say Pose NOT set: stop first.
  6. Hold START, then press A (as if pairing a gamepad): the pose must NOT be set.
  7. Choose RED in INIT (X = BLUE, B = RED) and repeat step 3 on the red side: the pose should use the same numbers from the red wall (BIOBUZZ).

Pass rule

Step 3 sets the pose within 1 in and 2 degrees of the spot you wrote; steps 5 and 6 do not set it (0 of 2); the RED pose in step 7 matches the reset spot for RED that INIT shows.

Record

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

  • the reset spot you used (x, y, heading)
  • the pose shown after step 3 and after step 4
  • what steps 5 and 6 showed
  • the INIT line Reset spot for RED: ...

If your robot is different

If you moved "set pose" to another button (lib.setPose(...) in libraryButtons), use that one and say which. On a field that is a mirror image (not BIOBUZZ), leave mirrorForRed out and check that RED mirrors x and the heading. If INIT warns that two places give different mirrorForRed values, copy the warning into your report.

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: SET-01 Hardware Check finds every device and each motor counts up

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