πŸ’» Programming Β· EZ Template Β· Intermediate β†’ Advanced

Skills Autonomous in EZ Template

πŸ—ΊοΈ Flowchart β€” Skills auton β€” what's different from match auton

Skills is a full minute of autonomous, not 15 seconds. Strategy and routine design changes significantly.

flowchart TD
    Start([Designing a skills auton]) --> Q1{Driver skills
or programming skills?} Q1 -->|"Driver skills"| Driver[Full 60s driver control
no auton at all
practice on practice field] Q1 -->|"Programming skills"| Prog[Full 60s autonomous
no driver input allowed
different routine entirely] Prog --> Plan[Plan 4-6 scoring loops
each loop: grab β†’ score β†’ return] Plan --> Q2{Sensor-gated
or timed?} Q2 -->|"Sensor-gated (preferred)"| Sensor[More reliable
but each loop takes 8-12s] Q2 -->|"Timed (faster)"| Timed[Each loop 5-8s
but missed grab cascades] Sensor --> Test[Practice 10+ runs
note consistency] Timed --> Test Test --> Q3{Runs reliably?} Q3 -->|"Yes"| Compete([Run at event]) Q3 -->|"No"| Iterate[Adjust constants
or simplify] Iterate --> Test style Start fill:#1e293b,stroke:#22d3ee,stroke-width:2px,color:#e2e8f0 style Compete fill:#1e293b,stroke:#22c55e,stroke-width:2px,color:#e2e8f0 style Q1 fill:#fbbf24,color:#0f172a,stroke:#fbbf24 style Q2 fill:#fbbf24,color:#0f172a,stroke:#fbbf24 style Q3 fill:#fbbf24,color:#0f172a,stroke:#fbbf24

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 (past-season reference)
START β‘ ~8s β‘‘~18s β‘’~30s β‘£~45s END~58s IMU reset 6Γ—6 ft field (simplified)
⏱ 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
void Skills() {
  // ── 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:

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
πŸ—Ί Odom Movements β†’ ⚑ Using EZ β†’
⚙ STEM Highlight Mathematics: 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.
← ALL GUIDES