Class Vision.VisionFieldPoseEstimate

java.lang.Object
frc.robot.subsystems.vision.Vision.VisionFieldPoseEstimate
Enclosing class:
Vision

public class Vision.VisionFieldPoseEstimate extends Object
Immutable data class that bundles a vision-derived field pose with its FPGA timestamp and covariance matrix, ready for use with SwerveDrivePoseEstimator.addVisionMeasurement().
  • Constructor Details

    • VisionFieldPoseEstimate

      public VisionFieldPoseEstimate(Pose2d visionRobotPoseMeters, double timestampSeconds, Matrix<N3,N1> visionMeasurementStdDevs, int numTags)
      Parameters:
      visionRobotPoseMeters - field-relative robot pose
      timestampSeconds - FPGA-converted capture timestamp
      visionMeasurementStdDevs - 3×1 std-dev vector [x, y, theta]
      numTags - number of tags used in the solve
  • Method Details

    • getVisionRobotPoseMeters

      public Pose2d getVisionRobotPoseMeters()
      The estimated field-relative robot pose (metres, radians).
    • getTimestampSeconds

      public double getTimestampSeconds()
      The FPGA-converted timestamp of this measurement (seconds).
    • getVisionMeasurementStdDevs

      public Matrix<N3,N1> getVisionMeasurementStdDevs()
      The 3×1 standard-deviation vector [x, y, theta] passed to the pose estimator. Larger values indicate less trust in that dimension.
    • getNumTags

      public int getNumTags()
      Number of AprilTags that contributed to this estimate.