Record Class AprilTagPoseEstimator.VisionMeasurement
java.lang.Object
java.lang.Record
frc.robot.subsystems.apriltagvision.AprilTagPoseEstimator.VisionMeasurement
- Record Components:
pose- the estimated robot pose in meters and radianstimestampSeconds- the timestamp when the observation was captured in secondsstandardDeviations- uncertainty in x, y (meters) and rotation (radians)
- Enclosing class:
- AprilTagPoseEstimator
public static record AprilTagPoseEstimator.VisionMeasurement(edu.wpi.first.math.geometry.Pose2d pose, double timestampSeconds, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1> standardDeviations)
extends Record
A validated vision measurement ready for pose estimation fusion.
-
Constructor Summary
ConstructorsConstructorDescriptionVisionMeasurement(edu.wpi.first.math.geometry.Pose2d pose, double timestampSeconds, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> standardDeviations) Creates an instance of aVisionMeasurementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.edu.wpi.first.math.geometry.Pose2dpose()Returns the value of theposerecord component.edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1> Returns the value of thestandardDeviationsrecord component.doubleReturns the value of thetimestampSecondsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VisionMeasurement
public VisionMeasurement(edu.wpi.first.math.geometry.Pose2d pose, double timestampSeconds, edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3, edu.wpi.first.math.numbers.N1> standardDeviations) Creates an instance of aVisionMeasurementrecord class.- Parameters:
pose- the value for theposerecord componenttimestampSeconds- the value for thetimestampSecondsrecord componentstandardDeviations- the value for thestandardDeviationsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pose
public edu.wpi.first.math.geometry.Pose2d pose()Returns the value of theposerecord component.- Returns:
- the value of the
poserecord component
-
timestampSeconds
public double timestampSeconds()Returns the value of thetimestampSecondsrecord component.- Returns:
- the value of the
timestampSecondsrecord component
-
standardDeviations
public edu.wpi.first.math.Matrix<edu.wpi.first.math.numbers.N3,edu.wpi.first.math.numbers.N1> standardDeviations()Returns the value of thestandardDeviationsrecord component.- Returns:
- the value of the
standardDeviationsrecord component
-