Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/robototes/REBUILT2026/llms.txt

Use this file to discover all available pages before exploring further.

REBUILT 2026 is the competition robot codebase for Team Robototes (2412), written in WPILib command-based Java for the 2026 FRC game REBUILT. The project targets the RoboRIO 2 running Java 17 and is built with GradleRIO 2026.2.1. It drives a fully swerve-based drivetrain (CTRE Phoenix 6 TalonFX + CANcoder), an articulated launcher with a hood, a rotating turret, a game-piece intake and indexer, an LED strip, and a three-camera Limelight vision system — all coordinated through WPILib’s CommandScheduler.

High-level architecture

The entry point is Main.java, which calls RobotBase.startRobot(Robot::new). Robot extends TimedRobot and owns the top-level object graph.
Main
 └─ Robot  (TimedRobot, 20 ms loop)
     ├─ Subsystems  ← creates and holds every SubsystemBase
     │    ├─ CommandSwerveDrivetrain  (drivebaseSubsystem)
     │    ├─ LauncherSubsystem        (hood + flywheels + turret)
     │    ├─ IntakeSubsystem          (pivot + rollers)
     │    ├─ IndexerSubsystem         (spindexer + feeder)
     │    ├─ VisionSubsystem          (three Limelights)
     │    └─ LEDSubsystem             (CANdle)
     ├─ Controls   ← all button bindings and default commands
     └─ CommandScheduler.getInstance().run()  ← called every robotPeriodic()
Robot.robotPeriodic() is the heartbeat of the system. It runs the CommandScheduler, updates vision pose estimates from the drivetrain’s SwerveDriveState, logs garbage-collection count to SmartDashboard, and resumes the DataLog every second.
Controls is instantiated after Subsystems. It receives the Subsystems object and a SimWrapper and registers all CommandXboxController trigger bindings there. No robot logic lives in the periodic callbacks beyond calling CommandScheduler.run().

Package structure

PackageContents
frc.robotMain, Robot, Subsystems, Controls, Hardware constants
frc.robot.subsystems.drivebaseCommandSwerveDrivetrain (Phoenix 6 swerve)
frc.robot.subsystems.launcherLauncherSubsystem, TurretSubsystem, Flywheels, Hood
frc.robot.subsystems.intakeIntakeSubsystem, IntakePivot, IntakeRollers
frc.robot.subsystems.indexIndexerSubsystem, Feeder, Spindexer
frc.robot.subsystems.autoAutoLogic, AutoBuilderConfig, AutonomousField, AutoDriveRotate
frc.robot.sensorsLEDSubsystem
frc.robot.subsystemsVisionSubsystem
frc.robot.simSimWrapper, ShowVisionOnField (simulation wrappers)
frc.robot.utilUtilities: RobotType, GCMonitor, AllianceUtils, LimelightHelpers, BuildInfo, etc.
frc.robot.util.simulationRobotSim, FuelSim (robot physics simulation helpers)
frc.robot.generatedCompTunerConstants, AlphaTunerConstants (Tuner X generated swerve configs)

Enabled subsystems

Every subsystem is gated by a boolean flag in Subsystems.SubsystemConstants. The table below shows all flags as they appear in the current codebase.
ConstantDefaultSubsystem
DRIVEBASE_ENABLEDtrueSwerve drivetrain (CommandSwerveDrivetrain)
INTAKE_ROLLERS_ENABLEDtrueIntakeRollers
INTAKE_ARM_ENABLEDtrueIntakePivot
INTAKE_ENABLEDderivedIntakeSubsystem (arm AND rollers)
SPINDEXER_ENABLEDtrueSpindexer
FEEDER_ENABLEDtrueFeeder
INDEXER_ENABLEDderivedIndexerSubsystem (spindexer AND feeder)
FLYWHEELS_ENABLEDtrueFlywheels
HOOD_ENABLEDtrueHood
TURRET_ENABLEDtrueTurretSubsystem
LAUNCHER_ENABLEDderivedLauncherSubsystem (hood AND flywheels AND turret)
VISION_ENABLEDtrueVisionSubsystem (requires DRIVEBASE_ENABLED)
LEDS_ENABLEDtrueLEDSubsystem
Derived constants are computed as logical AND of their component flags — for example:
public static final boolean LAUNCHER_ENABLED =
    HOOD_ENABLED && FLYWHEELS_ENABLED && TURRET_ENABLED;
Disabling a subsystem by flipping its flag to false causes Subsystems to assign null to that subsystem field. Controls checks for null at the top of each configure*Bindings() method and exits early, so the rest of the binding code is safely skipped.

Dual hardware configurations

The codebase runs on two physical robots — an Alpha prototype and a Competition bot. The correct configuration is selected automatically at startup by reading the RoboRIO’s serial number in RobotType.java. In simulation the type is always SIM.
// RobotType.java — static initializer
if (RobotBase.isSimulation()) {
  TYPE = RobotTypesEnum.SIM;
} else {
  String serialNumber = RobotController.getSerialNumber();
  if (serialNumber.equals(comp)) {   // "032B4B39"
    TYPE = RobotTypesEnum.COMP;
  } else if (serialNumber.equals(alpha)) {  // "032B4B88"
    TYPE = RobotTypesEnum.ALPHA;
  } else {
    TYPE = RobotTypesEnum.OTHER;
  }
}
Wherever hardware differs — swerve module constants, turret PID gains, gear ratios, soft limits, and CAN bus routing — the code branches on RobotType.isAlpha() or RobotType.isComp(). See Robot Types for the full comparison.

Explore further

Quickstart

Clone the repo, build, simulate, and deploy to a RoboRIO in six steps.

Robot Types

Alpha vs Competition bot configuration — serial numbers, PID gains, gear ratios, and more.

Subsystems

Deep-dive into each subsystem: drivebase, launcher, intake, indexer, and vision.

Configuration

Hardware IDs, launcher constants, and live NT tuning.

Build docs developers (and LLMs) love