This documentation describes the architecture, patterns, and workflows for the Rebuilt2026 FRC robot codebase.
- Build:
./gradlew build - Deploy:
./gradlew deploy - Simulate:
./gradlew simulateJava - Language: Java 17
- Dependencies: WPILib, Monologue, PathPlanner, Phoenix 6, REVLib
The project is split into two main packages:
frc.robot: The specific robot implementation (subsystems, commands, mappings).frc.excalib: A reusable library containing core frameworks (Swerve, Motor wrappers, Math utils).
- Role: Coordinates state and interactions between multiple subsystems (e.g., aiming Turret while spinning up Shooter).
- Location:
src/main/java/frc/robot/superstructure/Superstructure.java. - Pattern:
RobotContainerinitializesSuperstructure, which in turn initializes and holds references to subsystems likeIntake,Shooter,Transport,Turret.
Avoid using raw vendor classes (like TalonFX) directly in subsystems. Use the project's wrappers:
- Motors:
frc.excalib.control.motor.controllers.TalonFXMotorwrapsTalonFX(Phoenix6). - Groups:
frc.excalib.control.motor.controllers.MotorGroupfor followers. - Mechanisms:
frc.excalib.mechanisms.Mechanismprovides a base for controlled mechanisms (PID, Feedforward).
All subsystems and logic classes should implement monologue.Logged.
- Use the
@Logannotation for fields to be logged. RobotContaineracts as the root of the log tree.
- PathPlanner: Used for auto routines.
- AutoBuilder: Configured in
Swerve.java. - Registration: Register named commands in
RobotContainer.registerCommands():NamedCommands.registerCommand("shoot", new InstantCommand(...));
- Chooser:
AutoBuilder.buildAuto(name)is used inRobotContainerto prompt the dashboard chooser.
- Commands: Define complex behaviors in
frc.robot.commands. - Inline Commands: Prefer defining simple composition in
RobotContainer.configureBindings()using factories (e.g.,.alongWith()). - Factories: Subsystems expose
Commandfactories (e.g.,shooter.shootCommand()) rather than raw methods.
src/main/java/frc/robot/RobotContainer.java: Main entry point for binding controls and autos.src/main/java/frc/robot/Constants.java: Centralized constants file.src/main/java/frc/robot/superstructure/Superstructure.java: High-level robot logic and subsystem instantiation.src/main/java/frc/excalib/swerve/Swerve.java: Custom Swerve implementation with PathPlanner and Odyssey integration.
- Vendor Deps: Wrappers in
frc.excalibeffectively hide the vendor implementation. Check the wrapper before assuming a vendor method exists. - Vision:
AuroraPoseGetterandAuroraClientinfrc.excalibhandle vision updates, integrated intoRobotContainer.periodic()andSwerve. - Coordinates: Uses standard WPILib field coordinates (blue alliance origin).