Java robot code for the 2026 FRC season, built on WPILib and AdvantageKit.
- WPILib 2026 (includes Java 17 and VS Code extensions)
- A roboRIO-connected robot or simulation environment
Use the Gradle wrapper — no separate Gradle installation needed.
Build (compile + check):
./gradlew buildDeploy to robot:
./gradlew deployRun in simulation:
./gradlew simulateJavaThis project uses Spotless with Google Java Format. Formatting is applied automatically on every build.
Apply formatting manually:
./gradlew spotlessApplyCheck formatting without modifying files:
./gradlew spotlessCheckCI will fail if
spotlessCheckdoes not pass. Always runspotlessApplybefore pushing.
The ascope-assets/ directory contains custom robot models and camera configurations for AdvantageScope.
To enable them in AdvantageScope:
- Open AdvantageScope.
- Go to Help → Show App Directory (or press
Cmd/Ctrl+Shift+.). - In your AdvantageScope settings (or via File → Preferences), set the Custom Assets folder to the
ascope-assets/directory in this repository.- Example path:
/path/to/Rebuilt/ascope-assets
- Example path:
- Restart AdvantageScope. The robot model and camera views will appear in the 3D field viewer.
Resets the swerve drive absolute encoders. This can be triggered while the robot is disabled.
- Open Glass.
- Go to NetworkTables → Triggers → Align Encoders.
- Toggle the value to
true.
When running in simulation, a keyboard (Keyboard 0) can be used as a driver controller. WASD controls translation and axis 2 controls rotation. Z resets heading.
Configuring rotation (axis 2) for left/right arrow keys:
Note: These settings are not persistent and must be re-applied each time the simulator is opened.
- Open the sim Driver Station.
- Go to DS → Keyboard 0 settings.
- Update the axis 2 bindings:
| Setting | Default | Change to |
|---|---|---|
| Increase key | e |
Right arrow |
| Decrease key | r |
Left arrow |
| Key rate | 0.01 |
0.050 |
| Decay rate | 0 |
0.050 |
| Max absolute value | 1.0 |
1.0 |
- Fork or branch from
main. - Run
./gradlew buildlocally to verify your changes compile and pass formatting. - Open a pull request targeting
main. CI will run a build check and Spotless formatting check automatically. - Keep PRs focused — one feature or fix per PR.