Modern FRC programming requires disciplined hardware awareness, command lifecycle control, and real-time motion profiling. Writing code that compiles is only ten percent of the challenge. Commanding physical mechanisms without tripping breakers, stripping gears, or causing brownouts is the true craft.
This pathway guides you through all seven stages (Stages 00 through 06) of the Bench-to-Autonomous curriculum across all 22 required lessons. Completion of every stage in sequence is required to qualify as an autonomous competition robot programmer. You will progress systematically from workstation environment configuration and bench hardware verification to tournament-grade swerve trajectory execution and optical vision pose estimation.
Never deploy an untuned closed-loop PID controller directly to an assembled competition robot. Always characterize feedforward gains on the bench and verify limit switches before running full motor voltage.
Path Structure
Section titled “Path Structure”1. Development Environment & Simulator (Stage 00)
Section titled “1. Development Environment & Simulator (Stage 00)”Before opening robot code, establish a predictable, isolated development environment:
- Install the official WPILib release with embedded OpenJDK and VS Code extensions.
- Manage vendor dependencies (CTRE Phoenix 6, REVLib, PathPlannerLib) through structured JSON manifests.
- Establish team Git discipline: repository cloning, branching strategies, commit hygiene, and Gradle build verification (
./gradlew build). - Run desktop simulation to verify autonomous routines and test subsystem logic without physical robot access.
2. CAN Bus and Device Addressing (Stage 01)
Section titled “2. CAN Bus and Device Addressing (Stage 01)”Every software system rests on bus communication. A single broken wire or duplicate ID halts robot execution:
- Assign unique device IDs across CTRE Phoenix and REV CAN networks.
- Set hardware inversion directions so positive control voltage produces forward physical travel.
- Verify absolute encoder zero offsets before mechanisms enter their mechanical hard stops.
3. Feedforward Characterization and Tuning (Stage 01)
Section titled “3. Feedforward Characterization and Tuning (Stage 01)”Closed-loop control starts with physics, not guesswork. Relying solely on proportional feedback causes violent oscillations and sluggish response:
- Measure static friction voltage () to initiate movement without mechanism jerk.
- Calculate velocity feedforward () to carry ninety percent of steady-state motor workload.
- Add proportional feedback () exclusively as an error corrector.
4. Java Foundations and Command Lifecycle (Stage 02)
Section titled “4. Java Foundations and Command Lifecycle (Stage 02)”WPILib coordinates complex mechanisms through the CommandScheduler:
- Master Java fundamentals: variables, primitive types, control flow, methods, classes, and loops.
- Apply Java object encapsulation using
private finalhardware handles and type-safe physical measures fromedu.wpi.first.units.*. - Control the four lifecycle stages:
initialize(),execute(),isFinished(), andend(boolean interrupted). - Use subsystem requirement locking: ensure two commands never simultaneously demand conflicting output from the same motor.
- Bind operator triggers to command actions with clean debouncing and default fallback commands.
5. Production Subsystem Architecture (Stage 03)
Section titled “5. Production Subsystem Architecture (Stage 03)”Reliable subsystems protect their own hardware against student command errors:
- Maintain strict private scoping of motor controllers and sensors inside
SubsystemBase. - Configure stator current limits (35A to 40A) in hardware to prevent motor burnout during physical stalls.
- Enforce forward and reverse software soft limits to protect mechanical travel boundaries.
- Provide continuous telemetry output in
periodic()for NetworkTables and DataLog analysis. - Centralize mechanism coordination and autonomous routine selection in
RobotContainer.
6. Swerve Kinematics and Field-Oriented Control (Stage 04)
Section titled “6. Swerve Kinematics and Field-Oriented Control (Stage 04)”Holonomic drivetrains decouple robot chassis rotation from translational motion:
- Transform target chassis velocities (, , ) into four independent module states.
- Read gyro heading values to support intuitive field-oriented driving.
- Desaturate wheel speeds when translation and rotation vector sums exceed physical maximum motor RPM.
- Maintain real-time odometry state tracking to feed field positioning.
7. PathPlanner Autonomous Routines (Stage 04)
Section titled “7. PathPlanner Autonomous Routines (Stage 04)”Autonomous excellence requires chaining paths with mechanism events:
- Design multi-piece Bezier trajectory paths mapped across competition field coordinates.
- Place event markers triggering intake deployment and shooter spin-up during active motion.
- Bind autonomous routines to the dashboard selector for competition match execution.
8. Vision Localization and Pose Estimation (Stage 05)
Section titled “8. Vision Localization and Pose Estimation (Stage 05)”Wheel odometry drifts over time from wheel slip and field collisions:
- Calculate Perspective-n-Point (PnP) 3D coordinate transforms on Limelight and PhotonVision coprocessors.
- Filter noisy or high-ambiguity AprilTag sightings based on target distance and camera geometry.
- Fuse latency-compensated optical measurements into
SwerveDrivePoseEstimatorfor drift-free field localization. - Execute closed-loop vision alignment commands for reliable game piece scoring.
9. Advanced Control, State Machines, and Telemetry (Stage 06)
Section titled “9. Advanced Control, State Machines, and Telemetry (Stage 06)”High-performing robots seamlessly coordinate multiple moving mechanisms without human delays:
- Build multi-mechanism command compositions (
sequence,parallel,race,deadline) with safety timeouts. - Coordinate superstructure state machines governed by Java enums to avoid physical self-collisions.
- Capture high-frequency flight-recorder telemetry with
DataLogManagerand inspect physics logs in AdvantageScope.
Check Your Work
Section titled “Check Your Work”Validate your software development readiness through these measurable milestones:
- Environment & Build Validation: Run
./gradlew buildin WPILib VS Code on a fresh template. The project must compile successfully with zero missing vendor libraries. - Git Workflow Check: Create a feature branch, commit a clean change with descriptive messages, and push to GitHub without committing temporary build artifacts (
build/or.wpilib/). - CAN Verification: Open Phoenix Tuner X or REV Hardware Client. Confirm all connected motor controllers report green health status, unique IDs, and zero packet drop frame errors.
- Feedforward Verification: Command a flywheel roller to 3,000 RPM using pure feedforward ( and ). Verify the roller reaches steady-state velocity within 5 percent of target before applying .
- Subsystem Protection: Attempt to drive an elevator beyond its upper soft limit in manual open-loop test mode. Verify the motor controller hardware cuts forward voltage automatically.
- Command Lifecycle Audit: Trigger a shooting sequence command in simulation. Confirm the intake stops instantly when the sequence is interrupted by an emergency cancel binding.
- Kinematic Validation: Rotate the robot chassis 360 degrees while commanding steady forward translation on the cart. Confirm all four swerve module azimuth angles track expected steering vectors smoothly.
- Trajectory Tracking: Follow an autonomous trajectory with event markers. Confirm the intake deploys and retracts dynamically at the specified waypoints without interrupting swerve movement.
Advanced Engineering Pathways
Section titled “Advanced Engineering Pathways”Once you have mastered the foundational Bench-to-Autonomous curriculum, advance your software expertise through specialized mature courses:
- Autonomous Trajectory Engineering (140 min): Time-optimal kinodynamic trajectory generation using Choreo, on-the-fly obstacle avoidance with PathPlannerLib, and closed-loop terminal alignment.
- Physics Simulation & Modern Control (140 min): Mechanism physics modeling with WPILib simulation classes and DCMotor models, automated SysId characterization, and state-space LQR and Kalman filter control loops.
Verified Sources & Standards
- WPILib Software Documentation & Command-Based Frameworkdocs.wpilib.orgWPILib Standard
- CTRE Phoenix 6 Architecture & Swerve APIv6.docs.ctr-electronics.comHardware Vendor
- PathPlanner Trajectory Generation & AutoBuilderpathplanner.devCommunity Reference
Path sequence
- 01
Tooling Installation
Install WPILib VS Code, embedded JDK, vendor dependencies, and Phoenix Tuner X.
- 02
Git for Robotics Teams
Set up team Git repository workflows, .gitignore rules, and Gradle wrapper builds.
- 03
Desktop Simulation Setup
Run WPILib desktop simulation, verify simulated HAL hardware, and practice headless unit testing.
- 04
CAN Bus & Device Configuration
Configure CAN bus addressing, set inversion rules, and verify device communication in vendor tools.
- 05
Bench Diagnostics & Signal Plotting
Verify physical rotation directions, low-voltage spin tests, and absolute encoder offsets on the bench.
- 06
Velocity Closed-Loop Tuning
Measure static friction kS and velocity feedforward kV on the bench before writing Java control loops.
- 07
Position Closed-Loop & Motion Magic
Characterize gravity feedforward kG and tune closed-loop position PID for arms and elevators.
- 08
Java Foundations for FRC Robotics
Apply object encapsulation, private final handles, and WPILib Units for type-safe code.
- 09
Command Lifecycle & Subsystem Requirements
Master the CommandScheduler loop, requirement reservation, and command composition patterns.
- 10
Triggers & Controller Bindings
Map operator controllers to robot actions using Trigger, debouncing, and default command fallbacks.
- 11
Building Mechanism Subsystems
Build production WPILib SubsystemBase classes with hardware protection and periodic telemetry.
- 12
Writing Mechanism Commands
Author atomic mechanism commands, timeout guards, and trigger-based operator bindings.
- 13
RobotContainer Wiring & Default Commands
Centralize subsystem wiring, trigger bindings, and autonomous routine selectors in RobotContainer.
- 14
Swerve Project Generation & Calibration
Configure swerve module steer and drive ratios, inversion states, and CANcoder offsets.
- 15
Swerve Kinematics & Field-Oriented Drive
Calculate chassis speeds, transform module azimuth and velocity vectors, and handle wheel desaturation.
- 16
PathPlanner Autonomous Routines
Integrate PathPlanner trajectory following with event markers, trigger bindings, and field poses.
- 17
AprilTag Geometry & MegaTag Algorithms
Configure optical coprocessors, 3D target coordinates, and perspective-n-point pose solutions.
- 18
Swerve Pose Estimator & Vision Fusion
Fuse latency-compensated AprilTag vision measurements into SwerveDrivePoseEstimator odometry.
- 19
Automated Alignment & Dynamic Targeting
Implement closed-loop AprilTag auto-scoring alignment routines using vision measurements.
- 20
Advanced Command Compositions
Compose complex multi-mechanism actions using parallel, sequence, race, and deadline groups.
- 21
State Machines & Mechanism Interlocks
Model superstructure mechanisms with Java enum state machines to prevent self-collisions.
- 22
Telemetry Logging & AdvantageScope
Record high-frequency flight-recorder logs with DataLogManager and inspect physics in AdvantageScope.