Class ApriltagPoseEstimate
When estimating the pose of an AprilTag, the algorithm may return two possible solutions due to perspective ambiguity. This class stores both candidate poses along with their associated error metrics, allowing downstream logic to determine which pose is more reliable.
Each pose is represented as a 6-element array of doubles: [x, y, z, roll, pitch, yaw].
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe error metric (e.g., reprojection error) associated withacceptedPose.double[]The first possible 3D pose of the AprilTag relative to the camera or robot frame, represented as[x, y, z, roll, pitch, yaw].doubleThe error metric (e.g., reprojection error) associated withrejectedPose.double[]The second possible 3D pose of the AprilTag relative to the camera or robot frame, represented as[x, y, z, roll, pitch, yaw]. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newApriltagPoseEstimatewith errors initialized to0.0and poses set tonull. -
Method Summary
-
Field Details
-
acceptedError
public double acceptedErrorThe error metric (e.g., reprojection error) associated withacceptedPose. Lower values indicate higher confidence in this candidate pose. -
rejectedError
public double rejectedErrorThe error metric (e.g., reprojection error) associated withrejectedPose. Lower values indicate higher confidence in this candidate pose. -
acceptedPose
public double[] acceptedPoseThe first possible 3D pose of the AprilTag relative to the camera or robot frame, represented as[x, y, z, roll, pitch, yaw].This pose is generally selected as the more reliable estimate, based on the associated error value.
-
rejectedPose
public double[] rejectedPoseThe second possible 3D pose of the AprilTag relative to the camera or robot frame, represented as[x, y, z, roll, pitch, yaw].This pose is typically the ambiguous alternative to
acceptedPose.
-
-
Constructor Details
-
ApriltagPoseEstimate
public ApriltagPoseEstimate()Creates a newApriltagPoseEstimatewith errors initialized to0.0and poses set tonull.This no-argument constructor exists primarily for use by serialization frameworks. In most cases, values should be assigned explicitly after construction.
-
-
Method Details
-
equals
Checks whether thisApriltagPoseEstimateis equal to another object.Two instances are considered equal if and only if:
- Their
acceptedErrorandrejectedErrorvalues are equal, and - Their
acceptedPoseandrejectedPosearrays contain the same elements in the same order.
- Their
-
hashCode
public int hashCode()Computes a hash code for thisApriltagPoseEstimate.The hash code is derived from the same fields used in
equals(Object):acceptedError,rejectedError,acceptedPose, andrejectedPose.
-