// Section 01

Autonomous Failure Types

Every auton failure has a root cause. Identify the type first — then trace backward.
⚠️
Before touching code: Verify the robot is physically identical to when auton last worked. Loose screws, changed compression, or shifted sensors cause most failures.

The Four Failure Types

🚫 Does Nothing
Robot sits still. Wrong brain slot, compile error, or driver control is running. Check the brain slot selection screen.
🔄 Drifts Off Path
Robot moves but curves. IMU drift, wheel mismatch, or motor speed offset. Usually mechanical or calibration-related.
⏳ Stops Early
Completes some moves then freezes. Exit condition never triggers or motor stalls. Check timeouts and sensor readings.
🎯 Inconsistent
Works sometimes, fails others. Battery level, field variation, or starting position. Systematic — not random.

First-Check Checklist

1
Confirm the correct brain slot is selected
On competition day the most common "auton failure" is running the wrong slot. Select your auton routine explicitly before every match — do not assume it remembered from last time.
2
Check battery charge
Anything below 60% will cause undershooting on drive moves. Use a new or fully charged battery for every match. Log the battery percentage when issues occur.
3
Verify starting position
Place the robot in exactly the same position every run. A half-inch error at the start compounds through every subsequent move.
// Section 02
Drift & Positioning Failures
Robot ends up in the wrong place. The most fixable category of auton failure.
SymptomLikely CauseFix
Curves consistently left/rightWheel diameter mismatch or motor offsetCheck wheel sizes; add drive correction constant
Right direction, wrong distanceTrack width incorrect in chassis configMeasure precisely: outside wheel edge to outside wheel edge
Fine at first, drifts laterIMU heading accumulation errorAdd chassis.turnToHeading(0) between moves
Random drift each runBattery variation or floor surfaceFull battery; run on match-quality foam tiles
Spins instead of moving forwardLeft/right motors swapped in port configVerify port numbers and directions in EZ setup

IMU Heading Check

1
Let IMU fully calibrate — never move during this
Calibration takes 2–3 seconds at startup. Any vibration or movement during this window corrupts the heading reference for the entire match.
2
Print heading before first move
Add Brain.Screen.print(imu.heading()); before your first drive command. It should read 0.0 (or your defined start heading). Non-zero means calibration failed.
3
Verify less than 1 degree drift over 10 seconds
Let the robot sit still after calibration and watch the heading value. More than 1 degree of drift indicates a poorly mounted IMU or a defective sensor.
💡
Build a starting jig: Cut a C-channel piece to rest against the tile edge. Place the robot against it each run. Removes starting position variation in 2 seconds flat.
// Section 03
Hangs & Timeouts
Auton starts correctly then stops mid-routine. An exit condition never fires, or a motor stalls.

Every movement in EZ Template waits for an exit condition — a threshold that signals arrival. If the robot is physically blocked or the motor stalls, it waits until a timeout fires. If no timeout is set, it waits forever.

⏳ No Timeout Set
chassis.set_drive_exit_conditions(1.5, 300, 0) — timeout of 0 means infinite wait. Always set a positive timeout in milliseconds.
🚫 Motor Stall
Motor reaches stall current pushing against an obstacle. Add stall detection or reduce the move distance. Check for mechanical binding.
🎯 Threshold Too Tight
Robot oscillates near target but never settles within 0.1 inches. Loosen: 0.5–1 inch for drive, 1–2 degrees for turns.

Setting Exit Conditions in EZ Template

1
Drive exit conditions
chassis.set_drive_exit_conditions(settle_error, settle_time_ms, timeout_ms);
Recommended start: chassis.set_drive_exit_conditions(1.5, 300, 2000);
2
Turn exit conditions
chassis.set_turn_exit_conditions(settle_error_deg, settle_time_ms, timeout_ms);
Recommended start: chassis.set_turn_exit_conditions(1, 300, 1500);
3
Detect when timeout fires
After a move completes, check chassis.drive_exit_output(). If it returns EXIT_OUTPUT::TIMEOUT, the robot did not reach its target — the next move may be in the wrong position.
// Section 04
Consistency & Competition
Auton works in practice, fails at competition. The environment changed. Your auton needs to be robust to variation.
🔋 Battery Level
Low battery slows motors and shortens drive distances 5–10%. Run auton on below-70% battery in practice to verify it still works.
🗻 Tile Variation
Competition tiles may be worn or warped. PID-tuned closed-loop movements handle this. Open-loop timed movements do not.
🏛 Starting Position
Half an inch off compounds through every move. Use a physical jig or tile edge reference every single run without exception.
🏃 Opponent Interference
A robot or game piece blocking your path deflects auton. Design routes that avoid the center. Use timeouts to recover and continue.

Pre-Competition Auton Checklist

1
Test at 80% battery the night before
Discharge a battery to 80%, then run your full auton sequence. If it passes at 80%, it will pass at competition. If it fails, your PID needs tightening.
2
Run on a practice field at the venue before matches
If possible, request a practice field run before eliminations. One run on competition-specific tiles is worth more than 20 runs in your garage.
3
Log battery, slot, and result for every match
Have a teammate record: battery percentage, which slot ran, and what happened. After 3 matches of logging, patterns emerge and problems become obvious.
💡
The real fix for inconsistency is PID, not tweaking constants: If you are adjusting distances by hand for each competition, your drive train is not properly closed-loop. Invest in proper EZ Template PID tuning once — it pays off for the rest of the season.
← ALL GUIDES