WestlakeLEARN
FTC · Java

FIRST Tech Challenge

FTC · Java

  • 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.

Module 11: Vision and AprilTagsVision

In this lesson, you will:

  1. 01Read tag id and metadata.
  2. 02Use range and bearing.
  3. 03Handle 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.

Which result best demonstrates completion of “AprilTags and Field Pose”?

Why record the test setup, prediction, and observed result?

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.

Finished reading?

Mark this lesson complete — “Vision Fallbacks and Confidence” is up next.

OpenCV Color and Region ProcessorsVision Fallbacks and Confidence