Skip to content

TripleHelixProgramming/Biocore

Repository files navigation

Biocore — FRC 2363 2027 Robot Code

CI

Java robot code for the 2027 FRC season, built on WPILib and AdvantageKit.

Contributing

See How to Contribute for the full workflow: environment setup, branching, conflict resolution, formatting, and PR review requirements.


Documentation

Architecture

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

Subsystems

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

Vision

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

Autonomous

Doc What it covers
Improving Trajectory Tracking Where tracking error comes from and a tiered menu of strategies to reduce it

Requirements

  • WPILib 2026 (includes Java 17 and VS Code extensions)
  • A roboRIO-connected robot or simulation environment

Building

Use the Gradle wrapper — no separate Gradle installation needed.

Build (compile + check):

./gradlew build

Deploy to robot:

./gradlew deploy

Run in simulation:

./gradlew simulateJava

Code Formatting

This project uses Spotless with Google Java Format. Formatting is applied automatically on every build.

Apply formatting manually:

./gradlew spotlessApply

Check formatting without modifying files:

./gradlew spotlessCheck

AdvantageScope Custom Assets

The ascope-assets/ directory contains custom robot models and camera configurations for AdvantageScope.

To enable them in AdvantageScope:

  1. Open AdvantageScope.
  2. Go to Help → Show App Directory (or press Cmd/Ctrl+Shift+.).
  3. 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
  4. Restart AdvantageScope. The robot model and camera views will appear in the 3D field viewer.

Utility Controls

Align Encoders

Resets the swerve drive absolute encoders. This can be triggered while the robot is disabled.

  1. Open Glass.
  2. Go to NetworkTables → Triggers → Align Encoders.
  3. Toggle the value to true.

Simulation

Keyboard Driver

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.

  1. Open the sim Driver Station.
  2. Go to DS → Keyboard 0 settings.
  3. 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

Credits and Licensing

This project is licensed under the BSD 3-Clause License. See individual source files for copyright holders.

Triple Helix Robotics (FRC Team 2363)

The robot-specific subsystems and supporting utilities are original work by Triple Helix Robotics, copyright 2025-2026.

AdvantageKit — Littleton Robotics (FRC 6328)

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.

WPILib

This project uses WPILib, the standard FRC robot programming library maintained by FIRST and WPILib contributors, licensed under BSD; see WPILib-License.md.

About

Triple Helix Robotics' code for the 2027 FRC Biocore season

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors