Most rookie software bugs are not subtle algorithm errors — they are a short list of the same gotchas, repeated every year. Recognize them on sight.
1. The robot spins instead of driving straight. One side is not inverted. Your two gearboxes face opposite directions, so a positive command drives them apart. Call setInverted(true) on one side (usually the right). If the robot drives backward when you push forward, you negated the wrong stick — remember Xbox stick-forward is negative Y, so arcadeDrive wants -getLeftY().
2. The robot looks dead but Robot Code is green. In command-based, you forgot CommandScheduler.getInstance().run() in robotPeriodic(). Without it, the scheduler never ticks — no default commands, no button bindings, nothing. This is the single most common command-based bug.
3. A mechanism fires once and never again, or a command never ends. Your command has no isFinished() end condition, or an autonomous step lacks withTimeout. A command that never finishes holds its subsystem forever and blocks every later command that requires it. Either return true from isFinished() when done, or wrap it in .withTimeout(seconds).
4. 'Loop time overrun' warnings. Your periodic code is taking longer than the 20ms loop. The usual culprits: System.out.println spam every loop, or blocking calls. Print sparingly and move heavy work out of the periodic loop.
Read the RioLog like a pro. The RioLog (or Driver Station console) is your primary debugger. After every deploy, watch for 'Robot program starting'. A Java stack trace there means an uncaught exception — read the top line of the trace for the exception type (e.g. NullPointerException) and the line number in your file, not WPILib's. A NullPointerException in your constructor often means a device failed to construct (sometimes a CAN ID typo) and your code crashed before teleop.
Instrument with telemetry. Push values to NetworkTables and watch them live in Glass or AdvantageScope — both are programmer debugging tools (not driver dashboards). Plot a stick value, a motor output, and a sensor reading on a graph; if the stick moves but the output is flat, you have isolated the bug to your command logic rather than wiring. AdvantageScope can also replay a saved WPILib data log after a match so you can debug a problem you couldn't reproduce in the pit. Logging beats guessing every time.
the part worth keeping
Key takeaways
- Robot spins not drives = a drive side needs setInverted; drives backward = wrong stick sign (Xbox forward is negative Y)
- Robot dead but code green = missing CommandScheduler.getInstance().run() in robotPeriodic
- Read the RioLog top stack-trace line for the exception type and YOUR file's line number; use Glass/AdvantageScope to plot stick vs output and isolate the bug
Getting Started with FRCCommon Mistakes & Troubleshootinglesson 4 of 5
Keep going
Take the quiz+10 XP with an accountMore in Common Mistakes & Troubleshooting
where 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.orgGlass Dashboard (WPILib)
- docs.advantagescope.orgAdvantageScope Documentation
- docs.wpilib.orgCommand-Based: The Command Lifecycle
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.
- 8 min readThe FRC Software Toolbox: Driver Station, Dashboards, AdvantageScope & SysIdA beginner-friendly tour of the FRC software ecosystem beyond robot code: Driver Station, dashboards (Glass, Elastic, AdvantageScope), SysId, and vendor tools./blogread it
- 9 min readFRC Command-Based Programming: Subsystems, Commands, and the SchedulerA beginner-friendly guide to WPILib command-based programming in Java: subsystems, commands, the CommandScheduler, triggers, and composing commands./blogread it
- 13 min readFRC Code Structure Best Practices: Command-Based Project ArchitectureHow to structure an FRC command-based robot project the right way — subsystems, commands, RobotContainer, and Constants — verified against official WPILib docs./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
01Your tank/differential drivetrain spins in a circle instead of driving straight. What is the typical software fix?
02In WPILib command-based, what happens when you schedule a command that requires a subsystem already held by a non-interruptible command?
03Which tool lets you view print statements and stack traces streamed from the robot program to help debug software gotchas?
Answer every question to submit.
All 28 lessons in Getting Started with FRCopenclose
01 / what-first-and-frc-are
02 / the-season-and-the-game
03 / culture-teams-and-roles
04 / getting-started-your-first-steps
05 / worked-examples-mini-projects
- Not read yet:Project 1 — Make a NEO Spin with the REV Hardware Client
- Not read yet:Project 2 — Deploy a Real Arcade-Drive Program
- Not read yet:Project 3 — Refactor into a Command-Based Drive Subsystem
- Not read yet:Project 4 — Build a Fuel Launcher for REBUILT
- Not read yet:Project 5 — A One-Button Autonomous Routine
06 / common-mistakes-troubleshooting
- Not read yet:The Connection Chain: When the Driver Station Won't Connect
- Not read yet:Brownouts: Why the Robot Goes Limp Mid-Match
- Not read yet:CAN Bus Gremlins: Missing and Conflicting Devices
- Not read yet:Software Gotchas: Inverted Drives, Scheduler Stalls, and Reading the RioLog
- Not read yet:Inspection-Day Failures: Bumpers, Size, and Weight
07 / advanced-techniques-case-studies
- Not read yet:Closed-Loop Control: PID + Feedforward for a Consistent Shot
- Not read yet:Swerve Drive: Omnidirectional Movement with YAGSL
- Not read yet:AprilTag Vision: Knowing Where You Are with PhotonVision
- Not read yet:Data-Driven Strategy: Scouting, EPA/OPR, and Alliance Selection
- Not read yet:Choosing Your Hardware Ecosystem: REV vs CTRE