Class PoseEstimate

java.lang.Object
io.github.roboblazers7617.limelight.PoseEstimate

public class PoseEstimate extends Object
Represents a 3D Pose Estimate.
  • Field Details

    • pose

      public Pose3d pose
      The estimated robot pose.
    • timestampSeconds

      public double timestampSeconds
      The NetworkTables timestamp in seconds.
    • latency

      public double latency
      The latency in milliseconds.
    • tagCount

      public int tagCount
      The number of tags used to compute this pose.
    • tagSpan

      public double tagSpan
      The maximium distance between the tags used to compute this pose in meters.
    • avgTagDist

      public double avgTagDist
      The average distance between tags used to compute this pose in meters.
    • avgTagArea

      public double avgTagArea
      The average area of the tags used to compute this pose.
    • rawFiducials

      public RawFiducialTarget[] rawFiducials
      The raw fiducial data used to estimate this pose.
    • isMegaTag2

      public boolean isMegaTag2
      Was this pose computed using MegaTag2?
  • Constructor Details

    • PoseEstimate

      public PoseEstimate()
      Instantiates a PoseEstimate object with default values.
    • PoseEstimate

      public PoseEstimate(Pose3d pose, double timestampSeconds, double latency, int tagCount, double tagSpan, double avgTagDist, double avgTagArea, RawFiducialTarget[] rawFiducials, boolean isMegaTag2)
      Creates a new PoseEstimate.
      Parameters:
      pose - The pose to use.
      timestampSeconds - The timestampSeconds to use.
      latency - The latency to use.
      tagCount - The tagCount to use.
      tagSpan - The tagSpan to use.
      avgTagDist - The avgTagDist to use.
      avgTagArea - The avgTagArea to use.
      rawFiducials - The rawFiducials to use.
      isMegaTag2 - isMegaTag2?
  • Method Details

    • getPose3d

      public Pose3d getPose3d()
      Gets the pose for this PoseEstimate.
      Returns:
      The pose for this PoseEstimate.
    • getPose2d

      public Pose2d getPose2d()
      Gets the pose as a Pose2d.
      Returns:
      pose as a Pose2d.
      See Also:
    • getDetectedTags

      public RawFiducialTarget[] getDetectedTags()
      Gets the rawFiducials for this PoseEstimate.
      Returns:
      The rawFiducials for this PoseEstimate.
    • getTimestampSeconds

      public double getTimestampSeconds()
      Gets the timestampSeconds for this PoseEstimate.
      Returns:
      The timestampSeconds for this PoseEstimate.
    • getTagCount

      public int getTagCount()
      Gets the tagCount for this PoseEstimate.
      Returns:
      The tagCount for this PoseEstimate.
    • print

      public void print()
      Prints detailed information about this PoseEstimate to standard output. Includes timestamp, latency, tag count, tag span, average tag distance, average tag area, and detailed information about each detected fiducial.