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);
Alpha bot
Competition bot
AlphaTunerConstants — generated by Tuner X for the Alpha prototype.| Parameter | Value |
|---|
| Top speed at 12 V | 5.48 m/s |
| Drive gear ratio | 5.357 : 1 |
| Steer gear ratio | 18.75 : 1 |
| Wheel radius | 1.84 in |
| CAN bus name | "Drivebase" (CANivore) |
| Slip current | 120 A |
| Drive supply current limit | (none — default TalonFXConfiguration) |
| Stator current limit (steer) | 60 A |
| Steer kV | 2.33 V / (rot/s) |
| Module positions (FL, FR, BL, BR) | ±12.375 in × ±10.5 in |
CompTunerConstants — generated by Tuner X 2026 for the Competition bot.| Parameter | Value |
|---|
| Top speed at 12 V | 5.30 m/s |
| Drive gear ratio | 5.357 : 1 |
| Steer gear ratio | 18.75 : 1 |
| Wheel radius | 1.924 in |
| CAN bus name | "Drivebase" (Phoenix 6 CANivore named "Drivebase") |
| Slip current | 80 A |
| Drive supply current limit | 80 A upper / 40 A lower for 2 s |
| Drive stator current limit | 80 A |
| Stator current limit (steer) | 60 A |
| Steer kV | 1.79 V / (rot/s) |
| Module positions (FL, FR, BL, BR) | ±9.375 in × ±12.375 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);
Alpha bot
Competition bot
| Parameter | Value |
|---|
| kP | 25 |
| kI | 0 |
| kD | 0 |
| kS | 0.41 V |
| Gear ratio | 24 : 1 |
| Forward soft limit | 190° |
| Reverse soft limit | 0° |
| CAN bus | CANBus.roboRIO() |
| Parameter | Value |
|---|
| kP | 200 |
| kI | 0 |
| kD | 2 |
| kS | 0.65 V |
| Gear ratio | 40 : 1 |
| Forward soft limit | 350° |
| Reverse soft limit | -90° |
| CAN bus | CompTunerConstants.kCANBus ("Drivebase" CANivore) |
Both robots share the same stator and supply current limits (40 A each) and the same motor ID (Hardware.TURRET_MOTOR_ID = 23).
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
| Property | Alpha | Competition |
|---|
| RoboRIO serial | 032B4B88 | 032B4B39 |
| Top drivetrain speed | 5.48 m/s | 5.30 m/s |
| Wheel radius | 1.84 in | 1.924 in |
| Swerve module footprint | 12.375 × 10.5 in | 9.375 × 12.375 in |
| Turret kP | 25 | 200 |
| Turret kD | 0 | 2 |
| Turret kS | 0.41 V | 0.65 V |
| Turret gear ratio | 24 : 1 | 40 : 1 |
| Turret travel | 0° – 190° | −90° – 350° |
| Turret CAN bus | roboRIO | CANivore "Drivebase" |
| Vision velocity gate | 2.0 m/s / 0.2 rad/s | none |
| Primary vision cameras | Limelight C | Limelight A + B |