This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
FRC 2026 robot code for Team 4607. Java 17, WPILib command-based framework, CTRE Phoenix 6 motor controllers, swerve drivetrain, PathPlanner autonomous routines, and Limelight vision.
./gradlew build # Build the project
./gradlew deploy # Deploy to RoboRIO
./gradlew simulateJava # Run in simulation with GUI + DriverStation
./gradlew test # Run JUnit 5 testsTeam number is loaded from .wpilib/wpilib_preferences.json.
Entry point: Main.java → Robot.java (extends TimedRobot, 50Hz loop) → RobotContainer.java (wires subsystems, commands, and controls).
Key organizational pattern: Robot constants (CAN IDs, gear ratios) go in Constants.java. Tunable values (PID gains, velocities, feedforward) go in Calibrations.java. These are separate by design — constants are permanent hardware facts, calibrations are values that get tuned.
Subsystems (subsystems/): Each subsystem wraps CTRE TalonFX motors and implements the WPILib SubsystemBase pattern. Current subsystems: CommandSwerveDrivetrain, LeftFlywheel, LeftHood, LeftTurret, LeftChamber, IntakeArm, IntakeWheels, Indexer.
Commands (Commands/): Action classes that coordinate subsystems. Shot commands (HubShot, OutpostShot, GeneralShot, etc.) orchestrate the full shooter pipeline (turret aim, hood angle, flywheel spin-up, chamber feed). The Left prefix on shooter-related subsystems/commands distinguishes left vs right shooter sides.
Generated code (generated/TunerConstants.java): Auto-generated by CTRE Tuner X for drivetrain hardware config. Do not manually edit — regenerate through the Tuner X application.
Vision: Dual Limelight cameras (limelight-br, limelight-bl) provide pose estimates fused into drivetrain odometry in Robot.java. LimelightHelpers.java is a vendored helper library.
Autonomous: PathPlanner paths and autos live in src/main/deploy/pathplanner/. Named commands are registered in RobotContainer to link PathPlanner events to robot commands.
Telemetry: Telemetry.java publishes drivetrain state to NetworkTables for dashboard visualization.
- Motor CAN IDs are defined in
Constants.javainner classes (e.g.,LeftChamberConstants.kMotor1CANID) - PID/FF gains are defined in
Calibrations.javainner classes - Commands use the WPILib command-based pattern — subsystem requirements declared via
addRequirements() - Checkstyle enforced using Google Java Style with 125-char line limit (
styleguide-frc4607.xml)
Managed via JSON files in vendordeps/ — Phoenix6, PathPlannerLib, WPILib tools. Install/update through WPILib VS Code extension "Manage Vendor Libraries" command, not manually.