Skip to content
learnFRC.org
programmingdepartment

Programming

Validate hardware, model mechanisms, and build observable robot behavior from teleop through autonomous.

Programming begins at the bench. Confirm device identity, motor direction, sensor phase, and safe limits before building commands and autonomous routines.

Feedforward first

Use mechanism models to provide the expected voltage. Let feedback correct the remaining error instead of asking PID to do all the work.

LearnFRC provides three structured programming courses tailored for every stage of robot development:

  1. From Bench to Autonomous (695 min): The foundational curriculum covering WPILib installation, CAN device configuration, bench velocity/position tuning, Command-Based architecture, swerve kinematics, vision localization, and state machines.

  2. Autonomous Trajectory Engineering (140 min): Time-optimal kinodynamic trajectory generation using Choreo, real-time dynamic obstacle avoidance with PathPlannerLib, multi-subsystem action choreography, and terminal AprilTag alignment.

  3. Physics Simulation & Modern Control (140 min): Simulation-first development with WPILib physics classes and modern brushless DCMotor models, virtual hardware loopbacks, automated SysId system identification, and state-space LQR and Kalman filter control loops.

Courses

Handbook

CAN Bus Architectures & Topologies

Network topologies, CAN 2.0 vs CAN FD, termination resistance, bus utilization bottlenecks, and status frame optimization.

Feedforward Control (kS, kV, kA, kG)

Why open-loop model-based feedforward handles 90%+ of motor voltage, and how to calculate and calibrate gains for real mechanisms.

High-Speed Telemetry & AdvantageScope

Structured data logging using WPILib DataLogManager, Epilogue annotation telemetry, NetworkTables 4, and visualizing match execution in AdvantageScope.

Kinematics, Odometry & Exponential Pose Integration

Mathematical transformations between chassis velocities and swerve module states, and integrating robot position on the field.

Motion Profiling & Motion Magic

Generating smooth kinematic trajectories with bounded velocity, acceleration, and jerk to protect robot mechanisms.

PID Control Theory & Anti-Windup

Intuitive and mathematical foundations of Proportional, Integral, and Derivative closed-loop feedback controllers.

Vision Localization & AprilTag Fusion

3D perspective-n-point pose estimation, Limelight MegaTag algorithms, and fusing vision measurements into swerve pose estimators.

Remote CANcoder Closed-Loop Pairing

Configure motor controllers to execute closed-loop position and velocity routines directly from remote absolute CANcoders without roboRIO software lag.

Examples

Beam-Break Indexer & Feeder Subsystem

Staged game-piece indexing and flywheel feeding subsystem with photoelectric beam-break sensors, anti-jamming, and ready-to-fire synchronization.

Differential / Tank Drive Subsystem

Production differential drivetrain implementation with arcade drive, curvature drive, slew rate limiting, and odometry.

Dual-Flywheel Shooter & Feeder Subsystem

High-velocity closed-loop flywheel shooter with kV/kS feedforward, differential surface speed control, and ready trigger.

Linear Elevator Subsystem (Motion Magic)

Production-tested cascade / continuous elevator subsystem using CTRE Motion Magic, gravity feedforward, and software travel limits.

Pivoting Slapdown Intake Subsystem

Production pivoting ground intake coordinating an articulated wrist pivot with high-torque intake rollers and current-spike piece detection.

REVLib Spark Subsystem (Spark Max & Spark Flex)

Production REVLib brushless motor template featuring SparkMax and SparkFlex configuration, smart current limiting, soft limits, and closed-loop control.

Roller Intake Subsystem (Current Spike Sensing)

Ground intake subsystem with stator current spike detection for reliable game-piece indexing and auto-shutoff.

Single-Jointed Arm Subsystem (ArmFeedforward)

Production rotating mechanism subsystem with absolute CANcoder tracking, cosine gravity compensation, and soft limits.

Swerve Drive Subsystem (CTRE Phoenix 6)

Production-grade swerve drivetrain subsystem with field-oriented drive, heading lock, telemetry, and PathPlanner auto support.

Teleop Heading Lock Swerve Command

Field-oriented swerve snap-to-angle command using WPILib PIDController with continuous input to lock chassis heading to cardinal field orientations.

Winch Climber Subsystem

High-reduction winch climber with current monitoring, mechanical ratchet release servo, and brake mode locking.

Best practices

Resources