Programming Level 2 - Robot Control Systems
Command-based architecture, sensors, simulation, and autonomous with real FRC tools
Table of content
Learning Objective
Apply Level 1's generic foundation to the FRC-specific control system: implement closed-loop feedback and motion profiles, integrate sensors (encoders, gyro/accelerometer, limit switches) using vendor libraries (CTRE Phoenix, REVLib) with proper calibration, develop command-based robot architecture with subsystem management, practice developing and testing code in robot simulation before it touches hardware, and create autonomous routines using PathPlanner or Choreo. This level is self-guided and typically takes a couple of months; completing it means you can perform most of the day-to-day programming the team needs.
Prerequisites
Primary Resources
- WPILib: What Is Command-Based Programming?
- WPILib: Motion Profiling in Command-Based
- WPILib: Robot Simulation
- WPILib: Path Planning (PathPlanner & Choreo)
Tasks
-
Advanced Robot Control
- Implement PID control loops
- Create motion profiles
- Design state machines
- Handle multiple control modes
-
Sensor Integration
- Read and process encoder data using the appropriate vendor library (CTRE Phoenix, REVLib)
- Integrate gyro/accelerometer input
- Implement limit switch logic
- Develop sensor calibration routines
-
Command-Based Programming
- Create robot subsystems
- Implement commands and command compositions
- Manage subsystem dependencies and requirements
- Handle command scheduling
-
Simulation & Dashboards
- Run and drive the robot code in WPILib's simulator with no physical robot present
- View live telemetry using a dashboard (Shuffleboard, Glass, or Elastic)
- Diagnose a simple bug using simulation instead of testing on the physical robot
-
Autonomous Development
- Design autonomous strategies
- Create modular autonomous routines using command compositions
- Generate and follow a path using PathPlanner or Choreo
- Test and validate autonomous modes in simulation and on the robot
Level 2 Completion Requirements
- Successfully implement a PID control system
- Create a working autonomous routine using PathPlanner or Choreo
- Demonstrate developing and testing a change in simulation before deploying to hardware
- Pass a code review with a senior programmer