Package frc.robot.subsystems.vision
Class Vision.VisionFieldPoseEstimate
java.lang.Object
frc.robot.subsystems.vision.Vision.VisionFieldPoseEstimate
- Enclosing class:
- Vision
Immutable data class that bundles a vision-derived field pose with its FPGA timestamp and
covariance matrix, ready for use with
SwerveDrivePoseEstimator.addVisionMeasurement().-
Constructor Summary
ConstructorsConstructorDescriptionVisionFieldPoseEstimate(Pose2d visionRobotPoseMeters, double timestampSeconds, Matrix<N3, N1> visionMeasurementStdDevs, int numTags) -
Method Summary
Modifier and TypeMethodDescriptionintNumber of AprilTags that contributed to this estimate.doubleThe FPGA-converted timestamp of this measurement (seconds).The 3×1 standard-deviation vector[x, y, theta]passed to the pose estimator.The estimated field-relative robot pose (metres, radians).
-
Constructor Details
-
VisionFieldPoseEstimate
public VisionFieldPoseEstimate(Pose2d visionRobotPoseMeters, double timestampSeconds, Matrix<N3, N1> visionMeasurementStdDevs, int numTags) - Parameters:
visionRobotPoseMeters- field-relative robot posetimestampSeconds- FPGA-converted capture timestampvisionMeasurementStdDevs- 3×1 std-dev vector [x, y, theta]numTags- number of tags used in the solve
-
-
Method Details
-
getVisionRobotPoseMeters
The estimated field-relative robot pose (metres, radians). -
getTimestampSeconds
public double getTimestampSeconds()The FPGA-converted timestamp of this measurement (seconds). -
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.
-