TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/spectrum3847/2026-Spectrum/llms.txt
Use this file to discover all available pages before exploring further.
Launcher subsystem spins four Kraken X60 FOC motors to accelerate fuel game pieces to the correct exit velocity. The Hood subsystem adjusts the launch angle via a TalonFX-driven arm mechanism. Together with the swerve drive auto-rotating toward the goal (via pilotAimAtTarget), they implement a closed-loop shoot-on-the-move system driven by ShotCalculator.
Launcher hardware
Launcher is configured in LauncherConfig with CAN IDs 46–49, all on the CANIVORE bus. Motor 46 is the leader; motors 47–49 are permanent followers.
| Motor | CAN ID | Alignment |
|---|---|---|
| Launcher (leader) | 46 | — |
| Launcher Top Right | 47 | Opposed |
| Launcher Bottom Left | 48 | Aligned |
| Launcher Bottom Right | 49 | Opposed |
Launcher.java
Kp = 10, Ks = 20, and Kv = 0. Current limits are tiered: 80 A supply current dropping to 60 A after 1 s, with a 100 A stator limit.
LauncherStates command reference
LauncherStates schedules commands onto the Launcher subsystem using the same scheduleIfNotRunning guard used throughout the codebase.
| State method | Behavior |
|---|---|
idlePrep() | Spin at idlingRPM (700 RPM) — keeps flywheel warm |
aimAtTarget() | Track shot speed via ShotCalculator (trackTargetCommand) |
autonAimAtTarget() | Fixed velocity at autoTrenchLaunch (1800 RPM) for autonomous |
slowLaunch() | Fixed velocity at slowLaunchSpeed (400 RPM) |
customLaunchSpeed() | Live-tunable speed from NetworkTables (OnTheFlySpeed) |
neutral() | Zero voltage |
coastMode() / ensureBrakeMode() | Motor neutral mode changes |
launchFuel() is a Command (not a void state setter) returned for composition:
LauncherStates.java
aimingAtTarget() trigger
LauncherStates.aimingAtTarget() wraps launcher.aimingAtTarget(), which compares the current flywheel RPM against the ShotCalculator setpoint within the onTargetToleranceRPM window (100 RPM). Robot states use this trigger to gate the actual fuel release — the indexer tower does not advance until the launcher is on target.
LauncherStates.java
LauncherStates.java
TRACK_TARGET and LAUNCH_WITH_SQUEEZE states
RobotStates defines the targeting and launch states that coordinate the launcher and swerve drive:
TRACK_TARGET (pilot X button, whileTrue)
The robot enters
TRACK_TARGET when the pilot holds the X button. The swerve drive calls pilotAimAtTarget to rotate the chassis toward the goal angle computed by ShotCalculator. LauncherStates.aimAtTarget() spins the flywheel to the calculated speed. The indexer remains neutral — no fuel is advanced yet.SwerveStates:
SwerveStates.java
Shot sequence flow
The full shot sequence from aiming to fuel exit:Launcher source
Four-motor flywheel config, current limits, and simulation setup.
LauncherStates source
All state command factories and the aimingAtTarget trigger.
