Robot Won't Move - Troubleshooting Guide
Every technical hurdle is an opportunity for Discovery. If your robot isn’t moving as expected, don’t panic—this is where your team’s Innovation and Teamwork shine. Follow this checklist to systematically diagnose the issue, turning a stressful moment into a Fun learning experience and ensuring your robot makes its next high-Impact appearance on the field.
Quick Check (30 seconds)
Section titled “Quick Check (30 seconds)”1. Is Robot Code Running?
Section titled “1. Is Robot Code Running?”- Look at the Driver Station.
- Is “Robot Code” showing GREEN?
- ❌ RED/YELLOW: Code isn’t running.
- ✅ GREEN: Code is running, skip to Step 2.
If not green:
- Check for errors in RioLog.
- Reboot the RoboRIO.
- Restart the Driver Station.
- Redeploy code if needed.
2. Is Robot Enabled?
Section titled “2. Is Robot Enabled?”- Look at Driver Station mode.
- Are you in Teleop, Auto, or Test mode?
- Is the ENABLE button pressed?
If disabled:
- Click the mode you want (usually Teleop)
- Click the ENABLE button.
- Robot should move now.
3. Is Controller Connected?
Section titled “3. Is Controller Connected?”- Look at Driver Station USB tab.
- Do you see your controller?
- Are the lights on the controller on?
If not connected:
- Unplug and replug controller.
- Try different USB port.
- Replace controller batteries.
- Try different controller.
Detailed Diagnosis (5 minutes)
Section titled “Detailed Diagnosis (5 minutes)”If quick check didn’t fix it, work through these steps:
Step 1: Check Joystick Input (1 minute)
Section titled “Step 1: Check Joystick Input (1 minute)”Print joystick values to see if they’re being read:
@Overridepublic void execute() { double forward = -controller.getLeftY(); double strafe = controller.getLeftX(); double rotate = controller.getRightX();
// Add this to debug System.out.println("Joystick: F=" + forward + " S=" + strafe + " R=" + rotate);
drivetrain.drive(forward, strafe, rotate);}What to look for:
- ✅ Values changing: Joystick works, problem is elsewhere.
- ❌ Always zero: Joystick not being read.
- ❌ No output: Command isn’t running.
Step 2: Verify Command is Running (1 minute)
Section titled “Step 2: Verify Command is Running (1 minute)”Add debug print to see if command runs:
public DriveCommand(Drivetrain drivetrain, XboxController controller) { this.drivetrain = drivetrain; this.controller = controller; addRequirements(drivetrain); System.out.println("DriveCommand created!"); // Add this}
@Overridepublic void execute() { System.out.println("DriveCommand executing!"); // Add this // ... rest of code}What to look for:
- ✅ “executing!” prints every 20ms: Command is running.
- ❌ Only “created!” once: Command not scheduled.
- ❌ No output at all: Command not being created.
Step 3: Check Default Command (1 minute)
Section titled “Step 3: Check Default Command (1 minute)”Make sure drivetrain has a default command:
public RobotContainer() { // In RobotContainer.java drivetrain.setDefaultCommand( new DriveCommand(drivetrain, driver) );}Verify it’s set:
- Add print to RobotContainer constructor.
- Look for “DriveCommand created!” in RioLog.
- Check that default command is actually set.
Step 4: Check Subsystem (1 minute)
Section titled “Step 4: Check Subsystem (1 minute)”Add debug to subsystem:
public void drive(double forward, double strafe, double rotate) { System.out.println("Drive called: " + forward + ", " + strafe + ", " + rotate); drive.drive(forward, strafe, rotate);}What to look for:
- ✅ “Drive called!” prints: Subsystem receiving commands.
- ❌ No output: Subsystem not being called.
Step 5: Check Motor Configuration (2 minutes)
Section titled “Step 5: Check Motor Configuration (2 minutes)”Verify motors are configured correctly:
// Check in your subsystem constructorpublic Drivetrain() { // Add debug to verify motors are created System.out.println("Creating drivetrain..."); drive = new SwerveDrive(); System.out.println("Drivetrain created!");}Check motor hardware:
- Look for CAN errors in RioLog.
- Verify motor IDs are correct.
- Check that motors are getting power.
- Try one motor at a time.
Common Problems and Solutions
Section titled “Common Problems and Solutions”Problem 1: Wrong Controller Port
Section titled “Problem 1: Wrong Controller Port”Symptoms:
- Joystick values don’t change.
- “DriveCommand executing!” but values are zero.
Solution:
// Try different port numbersprivate final XboxController driver = new XboxController(0); // Try 1, 2, 3Problem 2: Deadband Too Large
Section titled “Problem 2: Deadband Too Large”Symptoms:
- Robot moves only when joystick is at max.
- Small movements don’t work.
Solution:
// Reduce or remove deadbanddouble forward = -controller.getLeftY();if (Math.abs(forward) < 0.1) forward = 0; // Reduce from 0.2 to 0.1Problem 3: Command Not Scheduled
Section titled “Problem 3: Command Not Scheduled”Symptoms:
- “DriveCommand created!” but never “executing!”.
- Command runs once then stops.
Solution:
// Make sure it's set as DEFAULT commanddrivetrain.setDefaultCommand(new DriveCommand(drivetrain, driver));
// NOT scheduled with .schedule()// new DriveCommand(drivetrain, driver).schedule(); // Wrong wayProblem 4: Subsystem Requirements Wrong
Section titled “Problem 4: Subsystem Requirements Wrong”Symptoms:
- Command creates but doesn’t execute.
- Other commands prevent this one from running.
Solution:
public DriveCommand(Drivetrain drivetrain, XboxController controller) { this.drivetrain = drivetrain; this.controller = controller; addRequirements(drivetrain); // MUST have this!}Problem 5: Motors Not Connected
Section titled “Problem 5: Motors Not Connected”Symptoms:
- Everything looks good in code.
- Motors show in RioLog but don’t move.
- No CAN errors
Solution:
- Check motor power cables.
- Verify motor controllers have power.
- Check motor breakers (if applicable)
- Try swapping motor controllers.
Problem 6: Simulation vs Real Robot
Section titled “Problem 6: Simulation vs Real Robot”Symptoms:
- Works in simulation but not real robot.
- Code runs but no movement.
Solution:
// Check you're using REAL IO, not SIM IOpublic Drivetrain() { // Make sure you're not creating IOSim by accident drive = new SwerveDrive();}Quick Fixes to Try
Section titled “Quick Fixes to Try”Fix 1: Reboot Everything
Section titled “Fix 1: Reboot Everything”- Disable robot.
- Reboot RoboRIO.
- Restart Driver Station.
- Re-enable robot.
Fix 2: Redeploy Code
Section titled “Fix 2: Redeploy Code”- Stop code
- Build project:
./gradlew build - Deploy:
./gradlew deploy - Re-enable robot.
Fix 3: Check Update Speed
Section titled “Fix 3: Check Update Speed”// Make sure signals are updatingmotor.setPosition(0).setUpdateFrequency(100); // 100HzFix 4: Verify CAN Bus
Section titled “Fix 4: Verify CAN Bus”- Check Phoenix Positioner shows motors.
- Look for CAN errors in RioLog.
- Verify CAN bus is connected.
When to Get Help
Section titled “When to Get Help”If you’ve tried everything above:
What to Tell Us:
Section titled “What to Tell Us:”- What you see: RioLog output, Driver Station status.
- What you tried: Which fixes you attempted.
- What happens: Exact symptoms (what does/doesn’t work)
- Code snippet: Relevant parts of your code.
Good Help Request:
Section titled “Good Help Request:”"My swerve drive won't move. I've verified:- Robot code is running (green on Driver Station)- Joystick values are printing (F=0.5, S=0.0, R=0.0)- Command is executing (prints every 20ms)- Subsystem drive() is being called- Motors show in Phoenix but don't move
No CAN errors in RioLog. All motor IDs are correct.What should I check next?"Prevention Tips
Section titled “Prevention Tips”Before Competition:
Section titled “Before Competition:”- ✅ Test all subsystems individually.
- ✅ Verify each motor works.
- ✅ Check all joystick mappings.
- ✅ Document controller ports.
During Competition:
Section titled “During Competition:”- ✅ Keep this checklist handy.
- ✅ Have spare controllers ready.
- ✅ Know motor IDs and CAN bus layout.
- ✅ Practice quick diagnosis.
After Fix:
Section titled “After Fix:”- ✅ Document what was wrong.
- ✅ Add check to prevent future issues.
- ✅ Tell team members what to watch for.
Related Guides
Section titled “Related Guides”Still stuck? Ask the community - we’re here to help!