Class ApriltagPoseEstimate

java.lang.Object
synapse.pipelines.apriltag.ApriltagPoseEstimate

public class ApriltagPoseEstimate extends Object
Represents the candidate 3D pose estimates of an AprilTag detection.

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

    Fields
    Modifier and Type
    Field
    Description
    double
    The error metric (e.g., reprojection error) associated with acceptedPose.
    double[]
    The first possible 3D pose of the AprilTag relative to the camera or robot frame, represented as [x, y, z, roll, pitch, yaw].
    double
    The error metric (e.g., reprojection error) associated with rejectedPose.
    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

    Constructors
    Constructor
    Description
    Creates a new ApriltagPoseEstimate with errors initialized to 0.0 and poses set to null.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks whether this ApriltagPoseEstimate is equal to another object.
    int
    Computes a hash code for this ApriltagPoseEstimate.

    Methods inherited from class java.lang.Object

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

    • acceptedError

      public double acceptedError
      The error metric (e.g., reprojection error) associated with acceptedPose. Lower values indicate higher confidence in this candidate pose.
    • rejectedError

      public double rejectedError
      The error metric (e.g., reprojection error) associated with rejectedPose. Lower values indicate higher confidence in this candidate pose.
    • acceptedPose

      public double[] acceptedPose
      The 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[] rejectedPose
      The 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 new ApriltagPoseEstimate with errors initialized to 0.0 and poses set to null.

      This no-argument constructor exists primarily for use by serialization frameworks. In most cases, values should be assigned explicitly after construction.

  • Method Details

    • equals

      public boolean equals(Object o)
      Checks whether this ApriltagPoseEstimate is equal to another object.

      Two instances are considered equal if and only if:

      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare with this instance
      Returns:
      true if the objects are equal; false otherwise
    • hashCode

      public int hashCode()
      Computes a hash code for this ApriltagPoseEstimate.

      The hash code is derived from the same fields used in equals(Object): acceptedError, rejectedError, acceptedPose, and rejectedPose.

      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object