Skip to main content
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:
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:

Drivetrain configuration

The drivebase is the most significant branching point. In Subsystems.java:
MaxSpeed in Controls.java follows the same pattern:
AlphaTunerConstants — generated by Tuner X for the Alpha prototype.

Turret configuration

TurretSubsystem branches on RobotType.isAlpha() for PID gains, gear ratio, soft limits, and CAN bus:
The turret motor CAN bus also differs:
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).
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:
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