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.Drivetrain configuration
The drivebase is the most significant branching point. InSubsystems.java:
MaxSpeed in Controls.java follows the same pattern:
- Alpha bot
- Competition bot
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:
- Alpha bot
- Competition bot
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).
getNumTargets() is reported differently: the Alpha bot uses only CCamera (Limelight C), while the Comp bot sums ACamera and BCamera.