PATH-02: PathAt - start things along a path while it drives
- Your robot needs: Mecanum drive, and goBILDA Pinpoint or SparkFun OTOS or Dead wheels (2 or 3 pods), and Pedro Pathing in the project.
- 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 8: Paths with Pedro Pathing (optional), Pedro module (Pedro Pathing).
Why
PathAt starts a part (an intake, a spin-up) at a place along a Pedro path while the robot keeps driving. It is new. We need to know each kind fires once, at the right place, on robots that are not ours, and that the report says when one did not fire.
Safety
- Real robot: the robot drives a path by itself. Clear floor, PRACTICE profile, hand on STOP.
- Use a part that is safe to switch on while driving (an intake, a light). Not a flywheel with pieces in it.
Setup
- Lesson 8 done: Pedro added,
PedroConstantstuned,Tunables.Odometry.checked = true. - A path with two parts (
PedroPath.line(...).then(PedroPath.curve(...))), about 4-6 ft long. - Tape marks on the floor where you expect each thing to start (real robot).
Steps
- Add three things to your
followstep:PathAt.fraction(0.5, "Intake on", robot.intake::in),PathAt.part(2, "Intake off", robot.intake::stop)andPathAt.inchesLeft(12, ...)with any part of yours. - Run it in the simulator first: does each start where you expected? (Watch the part, and the Driver Station.)
- Run it on the robot (PRACTICE). Watch where the robot is when each one starts. Mark it on the floor.
- Measure how far each mark is from where you expected it.
- Put a box in the path so the robot stops early (it ends
STALLEDor timed out). Read the report: it should list the things that did not start (not fired: ...). - Try a mistake:
PathAt.fraction(2, ...). INIT must stop with a message.
Pass rule
Each PathAt starts once (3 of 3) within 3 in of where you expected on the robot; step 5's report names every thing that did not fire; step 6 stops at INIT with a message that names the mistake.
Record
Write these down while you test. The report form has them as a list to fill in.
- your path (copy the
PedroPathline) - for each
PathAt: expected place, real place, distance off (inches) - the report line from step 5
- the INIT message from step 6
If your robot is different
Use any parts you have; a light or a servo is fine. PathAt.near(x, y, 6, ...) and PathAt.inchesDone(...) are welcome as extra tries. driveTo steps take PathAt too: if you have no Pedro, try PathAt.inchesLeft(...) on a driveTo and say so.
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: SHOT-05 Battery compensation - 4 quick shots on a tired battery
Something wrong on this page? Tell us with a short GitHub form.