Skip to content
learnFRC.org
programmingmodule100 min

Stage 05 - Vision Systems & Field Localization

Limelight 3/3G, PhotonVision, 3D AprilTag pose estimation, and fusing vision measurements with SwerveDrivePoseEstimator.

What you will learn

  • Configure camera exposure, resolution, and 3D camera transforms on vision coprocessors.
  • Reject noisy multi-tag and far-field optical solutions using ambiguity and distance filtering.
  • Fuse latency-compensated vision measurements into SwerveDrivePoseEstimator odometry.
  • Implement automated drive-to-target alignment routines using PID and profile constraints.

Prerequisites:Stage 04 - Swerve Drivetrain & Autonomous Routines

Wheel odometry tracks motion accurately over short timeframes, but wheel slip, carpet compliance, and robot-to-robot collisions introduce cumulative drift over the course of a match.

Stage 5 teaches how to integrate optical vision systems (Limelight and PhotonVision) using 3D AprilTags, fusing vision updates into an Extended Kalman Filter (SwerveDrivePoseEstimator) to maintain centimeter-level field localization.

[ Camera Sees AprilTags ] --> [ Solve 3D PnP Pose ] --> [ SwerveDrivePoseEstimator ] --> [ True Field Pose2d ]
▲
[ High-Speed Wheel Odometry ] ─┘
  1. Optical Capture: An onboard coprocessor (Limelight or Raspberry/Orange Pi) identifies the 4 corners of visible fiducial markers.
  2. PnP 3D Solution: Mathematical solver calculates camera position and orientation relative to known field coordinates.
  3. Kalman Fusion: Blends high-frequency (250 Hz) wheel odometry with latency-corrected vision measurements.
  4. Target Alignment: Commands drivebase directly toward scoring objectives with single-button driver automation.
Handbook Reference

For mathematical deep dives on Perspective-n-Point (PnP) geometry and Extended Kalman Filter state updates, consult the Vision Localization Handbook.

Verified Sources & Standards

Evergreen Standard Verified: Sep 25, 2026

Lessons