The gap between a robot that works in the shop and one that works in elimination matches is hardening. Here is a concrete, source-grounded checklist top teams run before every event.
1. Preemptive hardware-software checks#
Before packing, run WPILib's preemptive troubleshooting: confirm firmware versions match across the roboRIO, PDH, radio, and every motor controller (mismatched firmware causes mysterious dropouts). Scan the CAN bus in Phoenix Tuner X and the REV Hardware Client; confirm every device in your written CAN ID map answers and has a unique ID. Verify CAN utilization is comfortably below 90%.
2. Fail-safe defaults and exception safety#
Wrap risky constructors in try/catch -- some pneumatics/CAN objects (Compressor, Solenoid, PneumaticHub) can throw on construction if the CAN bus is disconnected at boot. A single uncaught exception in robotInit means no code runs all match. Defensive construction keeps the rest of the robot alive:
try { m_compressor = new Compressor(PneumaticsModuleType.REVPH); }
catch (Exception e) { DriverStation.reportError("PH init failed", false); }
Give every subsystem a safe default (motors neutral, mechanisms holding) so a crashed command doesn't leave an output stuck on.
3. Remove competition-unsafe code#
Strip System.out.println debugging (it causes loop overruns), disable any test-only code paths, and make sure logging is bounded -- log cached values, not repeated CAN queries, so you don't overrun under match load.
4. Make autos deterministic and selectable#
Use a SendableChooser so drivers pick the auto from the dashboard, mirror paths for the red alliance via the alliance flag, and simulate every auto before the event. Run each auto on blocks with wheels off the ground as a final sanity check. A deterministic auto that you've replayed (AdvantageKit) or simulated is one you can trust under pressure.
5. Version control discipline#
Commit working code to git and tag the exact commit you compete with so you can roll back instantly when a 'quick fix' between matches breaks something. Never deploy untested code in eliminations. A common failure pattern: a last-minute uncommitted change deployed in the pit, then a crash on field with no known-good version to revert to. The fix is process: protected main branch, tagged event builds, and a rule that field deploys come only from a tested, committed build.
6. Battery and brown-out review#
Log battery voltage every match and review the DS log for brown-out (orange) lines. Rotate batteries, retire weak ones, and add current limits to any mechanism that spiked the 12V fault counter.
Run this checklist as a team ritual, not an individual's memory. The teams that rarely have 'mystery' field failures are the ones who made hardening a repeatable process.
the part worth keeping
Key takeaways
- Match firmware versions and scan CAN (Phoenix Tuner X / REV Hardware Client) against a written ID map before every event.
- Wrap risky constructors in try/catch and give every subsystem a safe default so one crash doesn't kill the whole match.
- Strip prints/test code, bound logging, and make autos deterministic, alliance-mirrored, and simulated before the event.
- Tag the exact competing commit in git; field deploys come only from tested, committed builds -- never untested pit edits.
Programming, Controls & SensorsAdvanced Techniques and Case Studieslesson 5 of 5
That is the end of this track
Take the quiz+10 XP with an accountwhere this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- docs.wpilib.orgWPILib: Robot Preemptive Troubleshooting
- docs.wpilib.orgWPILib: roboRIO Brownout and Current Draw
- docs.wpilib.orgWPILib: 3rd Party Libraries / Vendordeps
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 13 min readWPILib Won't Deploy: Every Cause and How to Fix ItYour WPILib deploy is failing? Work the decision tree: wrong folder in VS Code, team number, roboRIO image, JDK version, macOS network privacy. Fixes for each./blogread it
- 7 min readFRC "No Robot Code" & Driver Station Won't Connect: Full Fix ChecklistA verified, step-by-step FRC troubleshooting decision tree for "No Robot Code" and a Driver Station that won't connect to the roboRIO — most common causes first./blogread it
- 8 min readThe FRC Control System Explained: roboRIO, PDH, Radio, and Everything BetweenThe FRC control system explained: how the roboRIO, REV PDH, radio, motor controllers, and CAN bus connect to make your robot drive — a plain-English electronics board tour./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01Why does the checklist wrap risky constructors (like Compressor or Solenoid) in try/catch during robotInit?
02In the version-control discipline step, what lets a team instantly revert when a 'quick fix' between matches breaks something?
03Under 'remove competition-unsafe code,' which action does the checklist call for before an event?
Answer every question to submit.
All 51 lessons in Programming, Controls & Sensorsopenclose
01 / prerequisites
02 / foundations-tools-and-first-program
03 / robot-program-and-command-based
04 / motors-and-control
05 / autonomous-trajectories-simulation
06 / sensing-fundamentals
07 / encoders
08 / gyros-imus-orientation
09 / closed-loop-control
10 / vision-pose-estimation
11 / worked-examples-mini-projects
- Not read yet:Mini-Project: A Closed-Loop Elevator with Motion Magic
- Not read yet:Mini-Project: A Velocity-Controlled Shooter on REVLib
- Not read yet:Mini-Project: A Teleop Swerve Drive Subsystem
- Not read yet:Mini-Project: An Autonomous Routine with PathPlanner
- Not read yet:Mini-Project: Vision-Aligned Scoring with Limelight
12 / common-mistakes-troubleshooting
13 / advanced-techniques-case-studies
- Not read yet:State-Space Control and Kalman Filtering
- Not read yet:Log Replay Architecture with AdvantageKit
- Not read yet:Advanced Pose Estimation: Multi-Tag Fusion and Standard Deviations
- Not read yet:Robot Coordination, Alerts, and Operator Feedback
- Not read yet:Case Study: Hardening Software Before an Event