Robotics visionIntermediate

AprilTag Vision for Robot Pose Estimation

AprilTags give a robot field-relative visual landmarks that can correct drifting odometry.

AprilTagsPhotonVisionPose estimationFRC

Site connection

The robotics season used PhotonVision, AprilTags, multiple cameras, and pose estimates to update drivetrain odometry.

Visual model

Pose correction enters the drivetrain world model

The swerve vector demo represents the motion side; AprilTags add external field landmarks that correct pose estimates.

Interactive

Each module receives its own speed and wheel angle

Why Odometry Drifts

Wheel encoders and gyros estimate motion by integrating small changes. Small errors accumulate. A camera seeing a known AprilTag can provide an absolute field reference and pull the estimate back toward reality.

Detect tagFind corners and decode the tag ID.
Know field poseLook up where that tag lives on the field.
Solve camera poseEstimate where the camera must be.
Fuse estimateAdd the vision measurement to pose estimation with uncertainty.

From Tag to Robot Pose

The tag ID tells the system which field landmark is visible. The observed tag corners plus camera calibration estimate the camera's pose relative to the tag. The robot-to-camera transform then converts camera pose into robot pose.

The estimate should carry uncertainty. A faraway tag, motion blur, partial occlusion, or bad calibration should count less than a close clean observation.

Multi-Camera Systems

Multiple cameras widen field coverage and reduce blind spots, but they add calibration and synchronization complexity. Each camera needs its own transform relative to the robot frame.

A robust system rejects impossible estimates, handles latency, and avoids over-trusting vision during collisions or ambiguous tag layouts.

SignalWhy it matters
Tag countMore tags usually improve pose confidence
DistanceFar tags increase uncertainty
AmbiguitySome tag poses have multiple plausible solutions
LatencyOld measurements must be inserted at the correct time
CalibrationBad camera intrinsics or transforms corrupt every estimate

Common Pitfalls

  • Adding every vision estimate with equal trust.
  • Ignoring camera-to-robot transform errors.
  • Forgetting latency compensation.
  • Using vision during high-motion blur without filtering.
  • Assuming odometry and vision coordinate systems match automatically.

Quick check

Quiz

What does an AprilTag ID provide?
  1. A known field landmark identity
  2. The robot battery voltage
  3. A direct motor command
  4. The match score

The ID lets the robot look up the tag's known field pose.

Sources and Further Reading

Related Explainers