ODO-02: Set pose here - hold START 1 s on the reset spot
- Your robot needs: goBILDA Pinpoint or SparkFun OTOS or Dead wheels (2 or 3 pods).
- Starter bots that fit: none (it needs parts the starter bots do not have).
- Library version: v0.17.0 or newer.
- The docs it tests: Lesson 7: Odometry: where am I on the field?, The button menu: every way a button can work.
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: alsomirrorForRed = false, written once for the whole robot inTunables.Aim(or inTunables.Odometryif you have noAimsection). - 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
- 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.
- INIT your TeleOp (with no autonomous before it). Read INIT's
Set pose: hold G1 START 1 s at ...line. - Hold gamepad 1's small START button for 1 second, sticks let go. Gamepad 1 buzzes twice and the Driver Station says
Pose set: .... - START the TeleOp. Drive about 4 ft away and back to the spot. Read the pose: it should be close to the reset spot.
- Push the left stick a little and hold START at the same time: it must say
Pose NOT set: stop first. - Hold START, then press A (as if pairing a gamepad): the pose must NOT be set.
- 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 resultNo 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.