๐ป Programming ยท EZ Template ยท Intermediate โ Advanced
Skills Autonomous in EZ Template
60 seconds, solo, maximize points. Skills is a completely different design problem than match auton โ longer chains, mid-run IMU resets, and consistency over raw speed. This guide builds the framework.
Skills vs Match auton: Match auton is 15 seconds with an alliance. Skills is 60 seconds alone. A match auton that's 95% consistent is great. A skills run that's 95% consistent loses to one that's 80% consistent but scores more points on the runs that work. Design for ceiling, not average.
๐บ Skills Route Planning
Plan on paper before touching code. A skills route has checkpoints โ discrete positions where the robot should be at specific times. Work backwards from 60 seconds.
โก Skills Route โ Push Back 2025โ26 Example
โฑ Time Budget โ Work Backwards from 60s
Zone 1 (0โ15s)
15s
Zone 2 (15โ35s)
20s
Zone 3 (35โ55s)
20s
Buffer (55โ60s)
5s
Always budget 5 seconds of slack. A skills run that finishes at exactly 60.0 seconds is one slipped wheel away from not completing its final score. Build in margin.
๐ป Skills Code Structure
voidSkills() {
// โโ Initialization โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
chassis.pid_targets_reset();
chassis.drive_imu_reset();
chassis.drive_sensor_reset();
chassis.drive_brake_set(MOTOR_BRAKE_HOLD);
// โโ Zone 1 (0โ15s) โ score near start โโโโโโโโโโโโโโโโ
chassis.pid_drive_set(24_in, DRIVE_SPEED, true);
chassis.pid_wait_until(8_in);
intake.move(127); // start intake on the way
chassis.pid_wait();
chassis.pid_turn_set(90_deg, TURN_SPEED);
chassis.pid_wait_quick_chain();
// โโ Mid-run IMU recalibration โโโโโโโโโโโโโโโโโโโโโโโโโ// After ~25s of movement, IMU may have drifted 1โ2 degrees.// Reset at a known heading reference (wall contact).
chassis.drive_imu_reset(); // reset to 0 at current heading// โโ Zone 2 (15โ35s) โ far field scoring โโโโโโโโโโโโโโ
chassis.pid_drive_set(36_in, DRIVE_SPEED, true);
chassis.pid_wait();
// ... more moves// โโ Zone 3 (35โ55s) โ return and score โโโโโโโโโโโโโโโ
chassis.pid_drive_set(-36_in, DRIVE_SPEED, true);
chassis.pid_wait();
intake.move(0);
}
๐ Mid-Run IMU Reset Strategy
After 30+ seconds of motion, IMU drift accumulates. A well-placed drive_imu_reset() at a known orientation (usually after driving into a wall or field element) corrects the drift before the robot enters a new zone. Rules to follow:
Reset at a heading you know: After driving dead straight into a wall and stopping, your heading is either 0ยฐ, 90ยฐ, 180ยฐ, or 270ยฐ. Call drive_imu_reset() there.
Don't reset mid-turn: Only reset at the start or end of a segment, never during a turn command.
Once per zone boundary is enough: More resets aren't always better โ each one assumes your heading is exactly what you think it is.
The "checkpoint" debugging strategy: When a skills run breaks at second 40, you don't want to re-run all 40 seconds to debug move #7. Structure your code in labeled sections (Zone 1, Zone 2, Zone 3). When testing, comment out all sections before the broken one and start from the last known-good checkpoint.
๐
OFFICIAL EZ TEMPLATE โ MOVEMENTS & ODOM
Full reference for pid_wait_until, pid_wait_quick_chain, and odom movements used in skills
⚙ STEM HighlightMathematics: Route Optimization & Expected Value in Skills
Skills route planning is an optimization problem with a fixed time budget (60 seconds driver, 60 seconds autonomous). The objective function is total score. Variables are route choices and time allocations. Constraints include robot cycle time, field element positions, and reliable endgame execution. The optimal route is not necessarily the one that scores the most elements — it is the one that maximizes expected score per second after accounting for consistency. A route that attempts 20 elements at 70% reliability scores less than a route targeting 14 elements at 95% reliability.
🎤 Interview line: “We plan Skills routes using expected value: target score x reliability per element. Our current route attempts 14 elements at 95% average reliability = 13.3 expected elements per run. An alternative route targeting 18 elements at 72% reliability = 12.96 — lower despite more elements. The data justified our conservative route choice.”
A Skills route targets 18 elements at 70% individual reliability. An alternative targets 12 elements at 95% reliability. Which produces a higher expected score?
⬛ 18-element route — more elements means higher ceiling score
⬛ 12-element route — 12 x 0.95 = 11.4 expected vs 18 x 0.70 = 12.6, so actually the 18-element route
⬛ They are equal — higher reliability offsets fewer elements
📝
Notebook entry tip:Test & Evaluate — Cyan slide — Log every Skills run as a test entry: date, score, time used, which elements were missed, and one specific change for next run. After 5+ runs, calculate your average score and reliability per element. This data justifies your route choices in the notebook — "our 12-element route scores consistently higher than our 18-element route" is a claim that needs data to be credible.