Class TagGroup

java.lang.Object
com.crossbotics.ftchelper.vision.TagGroup

public final class TagGroup extends Object
A group of AprilTags in a row that mark one target (BIOBUZZ: the 4 tags under each CELL), so a camera can report the GROUP as one target with one aiming point, even when it sees only some of the tags.

The webcam does not need this: the FTC SDK's own tag library already groups the tags ("clusters") and WebcamTags reports each cluster by its name. LimelightTags uses these groups to do the same, so camera.target("RED SCORING") works with either camera.

Each tag's place along the row is in inches, from the row's middle, positive = to the right as the tags are printed (the same numbers as the SDK's cluster list).


 TagGroup myGoal = new TagGroup("GOAL", new int[] {1, 2}, new double[] {-3, 3});
 LimelightTags camera = LimelightTags.create(hardwareMap, "limelight").groups(Arrays.asList(myGoal));
 
Docs: docs/modules/vision.md
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The group's name, as the target's name (the SDK's cluster name for this season's field).
  • Constructor Summary

    Constructors
    Constructor
    Description
    TagGroup(String name, int[] ids, double[] alongRowIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    alongRowIn(int id)
    The tag's place along the row (inches from the middle, + = right as printed), NaN if not in the group.
    static List<TagGroup>
    BIOBUZZ (2026-27): the 4 tags under each CELL, the same groups and names as the FTC SDK 12.0's tag library (AprilTagGameDatabase.getBioBuzzTagLibrary(), manual section 9.9).
    boolean
    contains(int id)
    True if this tag is in the group.
    static List<TagGroup>
    This season's groups (the default for LimelightTags).
    int[]
    ids()
    The tag ids in the group.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public final String name
      The group's name, as the target's name (the SDK's cluster name for this season's field).
  • Constructor Details

    • TagGroup

      public TagGroup(String name, int[] ids, double[] alongRowIn)
      Parameters:
      name - the target's name, e.g. "RED SCORING"
      ids - the tag ids in the group
      alongRowIn - each tag's place along the row, inches from the middle (+ = right as printed), in the same order as ids
  • Method Details

    • contains

      public boolean contains(int id)
      True if this tag is in the group.
    • alongRowIn

      public double alongRowIn(int id)
      The tag's place along the row (inches from the middle, + = right as printed), NaN if not in the group.
    • ids

      public int[] ids()
      The tag ids in the group.
    • biobuzz

      public static List<TagGroup> biobuzz()
      BIOBUZZ (2026-27): the 4 tags under each CELL, the same groups and names as the FTC SDK 12.0's tag library (AprilTagGameDatabase.getBioBuzzTagLibrary(), manual section 9.9).
    • currentSeason

      public static List<TagGroup> currentSeason()
      This season's groups (the default for LimelightTags).