Running Program
Running Program - Hardware Simulation Testing
WPILib's Hardware Simulation lets you run your code in the simulator while driving real motors connected to the CANivore.
A CANivore also lets you build robot applications that run directly on Windows or Linux machines.
Hardware simulation eliminates the need for a robot controller (roboRIO or SystemCore) during testing, while still letting you drive real motors over a CANivore.
Important: CANivore USB Setting
Before running Hardware Simulation code, you must turn OFFthe "CANivore USB" setting in TunerX. This prevents conflicts between the simulation environment and physical hardware communication.
Steps
Hardware Simulation Setup
Running on the 2027 stack: OpModes + the simulator
You start the simulator (or deploy to the robot) and the driver station lists every @Teleop / @Autonomous / @Utility class by name. Selecting one constructsthat OpMode (that's when its button bindings are built), and Robot.robotPeriodic() ticks Scheduler.getDefault().run() every loop no matter which mode is active.
Where the code actually runs
The stack runs on Java 25 and deploys to SystemCore (./gradlew deploy targets /home/systemcore). OpModes are discovered by scanning classes at runtime, so a missing one is nota compile error. If your mode doesn't show up on the driver station, check that the class is public, non-abstract, annotated with a name, in frc.robot (or a subpackage), and has a public (Robot) constructor.