Record Class VisionIO.PoseObservation
java.lang.Object
java.lang.Record
com.stuypulse.robot.subsystems.vision.VisionIO.PoseObservation
- Enclosing interface:
VisionIO
public static record VisionIO.PoseObservation(double timestamp, org.wpilib.math.geometry.Pose3d pose, double ambiguity, int tagCount, double averageTagDistance, VisionIO.PoseObservationType type)
extends Record
Represents a robot pose sample used for pose estimation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final doubleThe field for theambiguityrecord component.private final doubleThe field for theaverageTagDistancerecord component.private final org.wpilib.math.geometry.Pose3dThe field for theposerecord component.private final intThe field for thetagCountrecord component.private final doubleThe field for thetimestamprecord component.private final VisionIO.PoseObservationTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPoseObservation(double timestamp, org.wpilib.math.geometry.Pose3d pose, double ambiguity, int tagCount, double averageTagDistance, VisionIO.PoseObservationType type) Creates an instance of aPoseObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theambiguityrecord component.doubleReturns the value of theaverageTagDistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.wpilib.math.geometry.Pose3dpose()Returns the value of theposerecord component.inttagCount()Returns the value of thetagCountrecord component.doubleReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
timestamp
The field for thetimestamprecord component. -
pose
The field for theposerecord component. -
ambiguity
The field for theambiguityrecord component. -
tagCount
The field for thetagCountrecord component. -
averageTagDistance
The field for theaverageTagDistancerecord component. -
type
The field for thetyperecord component.
-
-
Constructor Details
-
PoseObservation
public PoseObservation(double timestamp, org.wpilib.math.geometry.Pose3d pose, double ambiguity, int tagCount, double averageTagDistance, VisionIO.PoseObservationType type) Creates an instance of aPoseObservationrecord class.- Parameters:
timestamp- the value for thetimestamprecord componentpose- the value for theposerecord componentambiguity- the value for theambiguityrecord componenttagCount- the value for thetagCountrecord componentaverageTagDistance- the value for theaverageTagDistancerecord componenttype- the value for thetyperecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
pose
Returns the value of theposerecord component.- Returns:
- the value of the
poserecord component
-
ambiguity
Returns the value of theambiguityrecord component.- Returns:
- the value of the
ambiguityrecord component
-
tagCount
Returns the value of thetagCountrecord component.- Returns:
- the value of the
tagCountrecord component
-
averageTagDistance
Returns the value of theaverageTagDistancerecord component.- Returns:
- the value of the
averageTagDistancerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-