Class ApriltagDetection
This class contains the tag's ID, detection accuracy metrics, and the estimated poses of the camera and tag in multiple coordinate systems. It is typically produced by an AprilTag detection pipeline.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble[]The estimated pose of the camera in the field coordinate system.double[]The estimated pose of the camera relative to the detected tag.floatThe Hamming distance of the detected tag, representing the number of bit errors.The estimated pose(s) of the detected AprilTag, including multiple hypotheses or refined estimates if available.intThe unique ID of the detected AprilTag.double[]The estimated pose of the tag in screen coordinates. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
tagID
public int tagIDThe unique ID of the detected AprilTag.Serialized/deserialized as
"tag_id"in JSON. -
hamming
public float hammingThe Hamming distance of the detected tag, representing the number of bit errors.Lower values indicate a more accurate detection.
-
cameraPose_fieldSpace
public double[] cameraPose_fieldSpaceThe estimated pose of the camera in the field coordinate system.Format:
[x, y, z, roll, pitch, yaw]. -
cameraPose_tagSpace
public double[] cameraPose_tagSpaceThe estimated pose of the camera relative to the detected tag.Format:
[x, y, z, roll, pitch, yaw]. -
tagPose_screenSpace
public double[] tagPose_screenSpaceThe estimated pose of the tag in screen coordinates.Format:
[x, y, z, roll, pitch, yaw]. -
tag_estimate
The estimated pose(s) of the detected AprilTag, including multiple hypotheses or refined estimates if available.
-
-
Constructor Details
-
ApriltagDetection
public ApriltagDetection()Creates a new, emptyApriltagDetection.This constructor is primarily used for JSON deserialization by Jackson and for general instantiation when no initial values are provided.
-
-
Method Details
-
equals
Compares thisApriltagDetectionwith another object for equality.Two
ApriltagDetectionobjects are considered equal if all of the following are true:- Their
tagIDvalues are the same. - Their
hammingvalues are numerically equal. - Their
cameraPose_fieldSpace,cameraPose_tagSpace, andtagPose_screenSpacearrays contain the same elements in the same order. - Their
tag_estimateobjects are equal according toApriltagPoseEstimate.equals(Object).
- Their
-
hashCode
public int hashCode()Computes a hash code for thisApriltagDetection.The hash code is based on the same fields used in
equals(Object):tagID,hamming,cameraPose_fieldSpace,cameraPose_tagSpace,tagPose_screenSpace, andtag_estimate.
-