Skip to content
2 min read
In progress

AprilTags and Vision Coprocessors

What AprilTags are, why FRC uses them, and the camera systems that detect them.

Lesson
34 / 51
Reward
+10XP

Sign in to track progress, earn XP, and save lessons.

Since 2023, FRC fields carry AprilTags — printed fiducial markers that act like QR codes for robots. They are the foundation of modern on-field localization.

What an AprilTag gives you

Each tag has a unique ID and a known, published location and orientation on the field (provided each season as the WPILib AprilTag field layout, an AprilTagFieldLayout you can load in code). When a camera detects a tag, it can compute the 3D transform from the camera to the tag. Because the tag's field position is known, the robot can work backward to compute its own field-relative pose. FRC used the 16h5 tag family in 2023, then switched to 36h11 starting in 2024 (and 2025+) because 36h11 substantially reduces false positives and is more widely compatible.

Why a coprocessor

Detecting tags and doing the pose math is computationally heavy and you do not want to bog down the roboRIO. So vision usually runs on a coprocessor — a small dedicated computer with a camera — that does the image processing and sends results to the roboRIO over the network via NetworkTables. The two dominant options:

  • Limelight: an all-in-one smart camera with a polished web UI, on-board AprilTag pipelines, and (on newer models) a built-in IMU. Easiest to set up.
  • PhotonVision: free, open-source vision software you run on a coprocessor like an Orange Pi or Raspberry Pi (or a supported camera). Highly flexible, with the PhotonLib vendor library for robot code.

Camera and tuning basics

For reliable tag detection you need:

  • Calibration: the camera's lens parameters must be calibrated so the 3D math is accurate. Both Limelight and PhotonVision provide calibration workflows; do this per resolution.
  • Exposure and resolution: lower exposure and a fixed gain reduce motion blur and make tags crisp; higher resolution sees tags farther but costs frame rate. Tune for low latency.
  • Robot-to-camera transform: you must tell your code exactly where the camera sits on the robot (position and angle), or the computed pose will be offset.

Latency matters

Vision results are always a little old by the time robot code uses them, because of capture, processing, and network time. Good vision libraries report a timestamp with each measurement so the pose estimator (next lesson) can account for the delay — never just treat a vision pose as 'now.'

Spot an error or something out of date?Log in to suggest an edit

Key takeaways

  • AprilTags have known field positions; detecting one lets the robot compute its own field pose. FRC used 16h5 in 2023 and switched to 36h11 from 2024 onward.
  • Vision runs on a coprocessor (Limelight or PhotonVision) and reports results over NetworkTables.
  • Calibrate the camera, set the robot-to-camera transform, and always use the reported timestamp because vision data is delayed.

Lesson quiz

Required

Answer all 3 questions correctly to complete this lesson.

01.Which AprilTag family has FRC used on the field since the 2024 season?

02.What is the primary role of a vision coprocessor such as PhotonVision or Limelight in an FRC robot?

03.Why do good vision libraries report a timestamp with each measurement?

Answer every question to submit.

All 51 lessons in Programming, Controls & Sensors