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 runs on two physical robots — an Alpha prototype used for early development and testing, and a Competition bot used at events. The codebase targets both from a single source tree: hardware-specific constants (PID gains, gear ratios, soft limits, CAN bus routing, and camera transforms) branch automatically at startup based on which robot the code is running on. In simulation the type is always SIM.

How robot type is detected

RobotType.java contains a static initializer that runs exactly once when the class is first loaded — before any subsystem is constructed:
public class RobotType {
  private static final String comp  = "032B4B39"; // Comp bot serial number
  private static final String alpha = "032B4B88"; // Alpha bot serial number

  public static final RobotTypesEnum TYPE;

  static {
    if (RobotBase.isSimulation()) {
      TYPE = RobotTypesEnum.SIM;
    } else {
      String serialNumber = RobotController.getSerialNumber();
      if (serialNumber.equals(comp)) {
        TYPE = RobotTypesEnum.COMP;
        DataLogManager.log("Running on Comp-bot");
      } else if (serialNumber.equals(alpha)) {
        TYPE = RobotTypesEnum.ALPHA;
        DataLogManager.log("Running on Alpha-bot");
      } else {
        TYPE = RobotTypesEnum.OTHER;
        DataLogManager.log("Unknown robot detected serial number is " + serialNumber);
      }
    }
  }

  public static boolean isAlpha() { return TYPE == RobotTypesEnum.ALPHA; }
  public static boolean isComp()  { return TYPE == RobotTypesEnum.COMP; }
  public static boolean isSim()   { return TYPE == RobotTypesEnum.SIM; }
}
RobotController.getSerialNumber() reads the RoboRIO’s hardware serial number from the FPGA. Because TYPE is a public static final field, every class that imports RobotType sees the same resolved value for the entire robot session.
In simulation, RobotBase.isSimulation() returns true before the serial number branch is ever reached, so TYPE is always RobotTypesEnum.SIM regardless of any environment configuration.
The full enum is:
public enum RobotTypesEnum {
  COMP,   // Competition bot — serial "032B4B39"
  ALPHA,  // Alpha prototype — serial "032B4B88"
  SIM,    // WPILib simulation environment
  OTHER   // Unknown RoboRIO — logs the serial number and continues
}

Drivetrain configuration

The drivebase is the most significant branching point. In Subsystems.java:
if (DRIVEBASE_ENABLED) {
  drivebaseSubsystem =
      (RobotType.TYPE == RobotTypesEnum.ALPHA)
          ? AlphaTunerConstants.createDrivetrain()
          : CompTunerConstants.createDrivetrain();
}
MaxSpeed in Controls.java follows the same pattern:
public static final double MaxSpeed =
    (RobotType.TYPE == RobotTypesEnum.ALPHA)
        ? AlphaTunerConstants.kSpeedAt12Volts.in(MetersPerSecond)
        : CompTunerConstants.kSpeedAt12Volts.in(MetersPerSecond);
AlphaTunerConstants — generated by Tuner X for the Alpha prototype.
ParameterValue
Top speed at 12 V5.48 m/s
Drive gear ratio5.357 : 1
Steer gear ratio18.75 : 1
Wheel radius1.84 in
CAN bus name"Drivebase" (CANivore)
Slip current120 A
Drive supply current limit(none — default TalonFXConfiguration)
Stator current limit (steer)60 A
Steer kV2.33 V / (rot/s)
Module positions (FL, FR, BL, BR)±12.375 in × ±10.5 in

Turret configuration

TurretSubsystem branches on RobotType.isAlpha() for PID gains, gear ratio, soft limits, and CAN bus:
private static final double kP = RobotType.isAlpha() ? 25  : 200;
private static final double kD = RobotType.isAlpha() ? 0   : 2;
private static final double kS = RobotType.isAlpha() ? 0.41 : 0.65;

private static final double GEAR_RATIO = RobotType.isAlpha() ? 24 : 40;

public static final double TURRET_MAX = RobotType.isAlpha() ? 190 : 350; // degrees
public static final double TURRET_MIN = RobotType.isAlpha() ? 0   : -90; // degrees
The turret motor CAN bus also differs:
turretMotor = new TalonFX(
    Hardware.TURRET_MOTOR_ID,
    RobotType.isAlpha() ? CANBus.roboRIO() : CompTunerConstants.kCANBus);
ParameterValue
kP25
kI0
kD0
kS0.41 V
Gear ratio24 : 1
Forward soft limit190°
Reverse soft limit
CAN busCANBus.roboRIO()
Both robots share the same stator and supply current limits (40 A each) and the same motor ID (Hardware.TURRET_MOTOR_ID = 23).

Vision camera transforms

VisionSubsystem defines three Transform3d constants that describe where each Limelight camera is mounted on the Competition bot relative to the robot origin. The Alpha bot uses a separate velocity-gating path (see below).
public static final Transform3d COMP_BOT_LEFT_CAMERA =
    new Transform3d(-0.076, 0.311, 0.274,
        new Rotation3d(0, toRadians(-20), toRadians(90)));

public static final Transform3d COMP_BOT_FRONT_CAMERA =
    new Transform3d(0.295, -0.288, 0.273,
        new Rotation3d(0, toRadians(-20), 0));

public static final Transform3d COMP_BOT_RIGHT_CAMERA =
    new Transform3d(0.212, -0.371, 0.273,
        new Rotation3d(0, toRadians(-20), toRadians(-90)));
All three cameras pitch down at −20°. Left and right cameras rotate ±90° in yaw; the front camera faces forward. The Alpha bot applies stricter velocity gating — vision updates are rejected if any chassis speed axis exceeds 2.0 m/s or if angular velocity exceeds 0.2 rad/s:
if (RobotType.isAlpha() &&
    (Math.abs(speeds.vxMetersPerSecond) > MAX_XY_VELO_ALPHA ||
     Math.abs(speeds.vyMetersPerSecond) > MAX_XY_VELO_ALPHA ||
     Math.abs(speeds.omegaRadiansPerSecond) > MAX_TURN_VELO_ALPHA)) {
  // reject update — "alpha-max-speed"
}
Additionally, target count for getNumTargets() is reported differently: the Alpha bot uses only CCamera (Limelight C), while the Comp bot sums ACamera and BCamera.

Summary comparison

PropertyAlphaCompetition
RoboRIO serial032B4B88032B4B39
Top drivetrain speed5.48 m/s5.30 m/s
Wheel radius1.84 in1.924 in
Swerve module footprint12.375 × 10.5 in9.375 × 12.375 in
Turret kP25200
Turret kD02
Turret kS0.41 V0.65 V
Turret gear ratio24 : 140 : 1
Turret travel0° – 190°−90° – 350°
Turret CAN busroboRIOCANivore "Drivebase"
Vision velocity gate2.0 m/s / 0.2 rad/snone
Primary vision camerasLimelight CLimelight A + B

Build docs developers (and LLMs) love