Skip to lesson
Westlake RoboticsLearn
Vault

FIRST Tech Challenge

Loading progress…

  • VisionPortal Camera Setup
  • OpenCV Color and Region Processors
  • AprilTags and Field Pose
  • Vision Fallbacks and Confidence

AprilTags and Field Pose

Use tag metadata and FTC pose values safely.

Vision and AprilTagsVision

In this lesson, you will:

  • Read tag id and metadata.
  • Use range and bearing.
  • Handle missing detections.

Concept narrative

AprilTags are known field landmarks. Detection gives the robot information about a visible tag, but metadata and filtering determine whether that information is useful.

Robot mental model

A tag is not just an image square. It has an identity and a known field relationship. The robot should react only to tags relevant to the current task.

Implementation walkthrough

Print id, name, range, bearing, and yaw. Filter by tag id or metadata. Start with driver alignment telemetry before autonomous correction.

AprilTagTelemetry.javaJava

for (AprilTagDetection detection : aprilTags.getDetections()) {
    if (detection.metadata == null) continue;
    telemetry.addData("tag", detection.id);
    telemetry.addData("range", detection.ftcPose.range);
    telemetry.addData("bearing", detection.ftcPose.bearing);
}

Common mistakes and debugging

No detections, unknown metadata, multiple tags, and bad camera calibration are normal failure modes. Use fallback behavior.

Practice

Write an AprilTag telemetry OpMode and align manually using bearing.

Checkpoint

  • Unknown tags are ignored.
  • Pose values are labeled.
  • Fallback handles no detections.
  • The test record includes the setup, prediction, and observed result.
  • A teammate can repeat the check from the saved evidence without guessing.

Reflection check

Check your understanding before moving on.

How should a lesson example handle an AprilTag detection with null metadata?
What is a safe early use of AprilTag range and bearing?

0 of 2 answered

References

FTC VisionPortal DocsOfficial FTC camera and processor lifecycle documentation.GM0 Computer VisionFTC-oriented vision concepts, pipelines, and practical advice.FTC AprilTag DocsOfficial AprilTag detection and metadata reference.
Loading lesson progress
Previous lessonOpenCV Color and Region ProcessorsNext lessonVision Fallbacks and Confidence