This guide walks you through setting up your development environment and getting the robot code running.
-
WPILib 2026 (includes VS Code, Java 17 JDK, and Gradle)
- Download from WPILib Installation Guide
- This installs everything you need: VS Code with WPILib extensions, Java 17 JDK, Gradle, and the WPILib libraries
-
Git for version control
- macOS:
xcode-select --installor git-scm.com - Windows: Git for Windows
- macOS:
-
CTRE Phoenix Tuner X (for motor controller configuration)
- Download from the Microsoft Store or CTRE Downloads
- Required to configure motor IDs, tune PIDs, and generate swerve constants
-
PathPlanner (for autonomous path design)
- Download from pathplanner.dev or the Microsoft Store
- GUI tool for designing autonomous paths and routines
- AdvantageScope - Data visualization and replay tool (docs.advantagescope.org)
- Elastic Dashboard - Alternative to SmartDashboard/Shuffleboard
- Limelight Web Interface - Access at
http://10.7.51.71:5801(front) orhttp://10.7.51.75:5801(back)
git clone <repository-url>
cd 2026RobotThe project uses Gradle via the GradleRIO plugin. You do NOT need to install Gradle separately.
# Build the project (compiles, checks for errors)
./gradlew build
# On Windows, use:
gradlew.bat buildThe first build will take several minutes to download dependencies. Subsequent builds are much faster.
# Full build with formatting check
./gradlew build
# Build without running tests
./gradlew assemble
# Format all code (Google Java Format via Spotless)
./gradlew spotlessApply
# Check if code is formatted correctly (CI will fail if not)
./gradlew spotlessCheck
# Clean build artifacts
./gradlew clean- USB: Connect a USB-A to USB-B cable from your laptop to the RoboRIO
- Wi-Fi: Connect to the robot's radio (
751network) - Ethernet: Direct ethernet to the robot's radio
# Deploy robot code to the RoboRIO
./gradlew deployThis compiles the code, creates a JAR, and uploads it to the RoboRIO at /home/lvuser/. The robot code starts automatically after deploy.
- Can't find roboRIO: Make sure you're connected via USB/Wi-Fi/Ethernet. The RoboRIO should be at
10.7.51.2. - Build fails: Run
./gradlew buildfirst to see compilation errors - Old code running: Try
./gradlew deploy --offlineor restart the robot
Simulation lets you test your code without a physical robot.
# Launch simulation with GUI
./gradlew simulateJavaThis opens:
- Simulation GUI - Shows robot state, lets you enable/disable modes
- Simulated Driver Station - Acts as the FRC Driver Station
- In the Simulation GUI, drag "Autonomous" or "Teleop" to the robot state
- Open AdvantageScope and connect to
localhost(NetworkTables) to visualize the robot - The MapleSim physics engine simulates swerve drive physics, game pieces, and field collisions
- Use a gamepad connected to your computer to drive in teleop
The simulation uses MapleSim (powered by the dyn4j physics engine) running at 200Hz on a separate thread. It simulates:
- Swerve module physics (drive motors, steer motors, wheel friction)
- Robot collision body (30"x30" bumpers, 110 lbs)
- Game piece interactions (fuel pickup via intake simulation)
- Field obstacles (hubs, outposts, barriers)
See Simulation Documentation for details.
frc.robot- Main robot code (Robot, Main, Constants)frc.robot.subsystems- All subsystems (Superstructure, drive, vision, etc.)frc.robot.subsystems.drive- Swerve drive codefrc.robot.subsystems.vision- Limelight vision processingfrc.robot.subsystems.simulation- Simulation-only codefrc.robot.subsystems.shooter- Shooter subsystem (currently commented out)frc.robot.util- Utility classes (ControlBoard, FieldConstants, LimelightHelpers)frc.lib- Reusable library classes (PS5Controller, TunableParameter, CTRE utilities)org.ironmaple.simulation- MapleSim physics engine (bundled in-tree)
- Singleton Pattern - All subsystems use
getInstance(). Never callnew SubsystemName(). - Command-Based - Uses WPILib's command-based framework. Subsystems define capabilities, commands compose behavior.
- Request-Based State Machines - Subsystems like Superstructure use
requestState()methods to transition between states. - Separation of Constants - Each subsystem has its own constants file (e.g.,
SwerveConstants.java,LimelightConstants.java).
- Create
NewSubsystem.javain the appropriate package underfrc.robot.subsystems - Extend
SubsystemBase - Add the singleton pattern:
private static NewSubsystem instance; public static NewSubsystem getInstance() { if (instance == null) instance = new NewSubsystem(); return instance; } private NewSubsystem() { /* constructor */ }
- Initialize in
Robot.javaconstructor:NewSubsystem.getInstance(); - Create a constants file if needed (e.g.,
NewSubsystemConstants.java)
- Open
ControlBoard.java - Add bindings in
configureDriverBindings()orconfigureOperatorBindings() - Use the
PS5Controllerfields:controller.crossButton,controller.leftTrigger, etc. - Example:
controller.crossButton.onTrue(new InstantCommand(() -> subsystem.requestAction()));
- Open PathPlanner GUI
- Create paths in the Paths tab
- Compose paths into autos in the Autos tab
- Save - files are stored in
src/main/deploy/pathplanner/ - The auto chooser in SmartDashboard automatically picks up new autos
Use TunableParameter to adjust values from SmartDashboard without redeploying:
new TunableParameter("Shooter/Speed", 12.0, (value) -> {
// Called whenever the value changes in SmartDashboard
this.shooterSpeed = value;
});- WPILib Docs: https://docs.wpilib.org/en/stable/
- CTRE Phoenix 6 Docs: https://v6.docs.ctr-electronics.com/en/stable/
- Chief Delphi (FRC community forum): https://www.chiefdelphi.com/
- FRC Discord: https://discord.gg/frc