| Symptom | Likely Cause | Fix |
|---|---|---|
| Curves consistently left/right | Wheel diameter mismatch or motor offset | Check wheel sizes; add drive correction constant |
| Right direction, wrong distance | Track width incorrect in chassis config | Measure precisely: outside wheel edge to outside wheel edge |
| Fine at first, drifts later | IMU heading accumulation error | Add chassis.turnToHeading(0) between moves |
| Random drift each run | Battery variation or floor surface | Full battery; run on match-quality foam tiles |
| Spins instead of moving forward | Left/right motors swapped in port config | Verify port numbers and directions in EZ setup |
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.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.
chassis.set_drive_exit_conditions(1.5, 300, 0) — timeout of 0 means infinite wait. Always set a positive timeout in milliseconds.chassis.set_drive_exit_conditions(settle_error, settle_time_ms, timeout_ms);chassis.set_drive_exit_conditions(1.5, 300, 2000);chassis.set_turn_exit_conditions(settle_error_deg, settle_time_ms, timeout_ms);chassis.set_turn_exit_conditions(1, 300, 1500);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.