Java robot code for the 2027 FRC season, built on WPILib and AdvantageKit.
See How to Contribute for the full workflow: environment setup, branching, conflict resolution, formatting, and PR review requirements.
| Doc | What it covers |
|---|---|
| Drive Subsystem: Pose and Heading | Why there is one rotation source of truth, how Drive and DriveCommands divide responsibilities, what setPose and getHeading do |
| I/O Architecture: Background Threading | Why sensor reads happen on background threads, how Phoenix 6 auto-refresh works, deferred logging pattern, profiling infrastructure |
| Defensive Guards | Philosophy for numerical guard placement (NaN, division by zero), where guards exist and why |
| Doc | What it covers |
|---|---|
| LED System | Physical strip layout, series/portion definitions, display functions, how to add custom patterns |
| Pneumatics Simulation | Physics model behind PneumaticsSimulator — ideal gas law, Cv flow, compressor model, piston dynamics |
| Doc | What it covers |
|---|---|
| Vision Calibration and Validation | Camera intrinsics, extrinsics, field layout accuracy, pre-season and per-event validation procedures |
| VisionFilter Architecture | How observations are scored and filtered — weighted geometric mean, velocity consistency, cross-camera correlation boost |
| Vision Filter Tuning | Why minScore = 0.6 and velocityUncertainScore = 0.7, how to check the score distribution in logs |
| Doc | What it covers |
|---|---|
| Improving Trajectory Tracking | Where tracking error comes from and a tiered menu of strategies to reduce it |
- 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 spotlessCheckThe 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 |
This project is licensed under the BSD 3-Clause License. See individual source files for copyright holders.
The robot-specific subsystems and supporting utilities are original work by Triple Helix Robotics, copyright 2025-2026.
The swerve drive subsystem, I/O architecture, and logging infrastructure are based on the AdvantageKit TalonFX Swerve template by Littleton Robotics (FRC 6328 "Mechanical Advantage"), and have been substantially modified. AdvantageKit is licensed under BSD 3-Clause; see LICENSE.
This project uses WPILib, the standard FRC robot programming library maintained by FIRST and WPILib contributors, licensed under BSD; see WPILib-License.md.