Package frc.robot.services.vision
Record Class Vision.VisionObservation
java.lang.Object
java.lang.Record
frc.robot.services.vision.Vision.VisionObservation
- Enclosing class:
- Vision
public static record Vision.VisionObservation(Pose2d visionPose, double timestamp, int cameraId, int tagCount, double stdDevX, double stdDevY, double stdDevRot)
extends Record
A record representing a single vision observation.
-
Constructor Summary
ConstructorsConstructorDescriptionVisionObservation(Pose2d visionPose, double timestamp, int cameraId, int tagCount, double stdDevX, double stdDevY, double stdDevRot) Creates an instance of aVisionObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcameraId()Returns the value of thecameraIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thestdDevRotrecord component.doublestdDevX()Returns the value of thestdDevXrecord component.doublestdDevY()Returns the value of thestdDevYrecord component.inttagCount()Returns the value of thetagCountrecord component.doubleReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisionPoserecord component.
-
Constructor Details
-
VisionObservation
public VisionObservation(Pose2d visionPose, double timestamp, int cameraId, int tagCount, double stdDevX, double stdDevY, double stdDevRot) Creates an instance of aVisionObservationrecord class.- Parameters:
visionPose- the value for thevisionPoserecord componenttimestamp- the value for thetimestamprecord componentcameraId- the value for thecameraIdrecord componenttagCount- the value for thetagCountrecord componentstdDevX- the value for thestdDevXrecord componentstdDevY- the value for thestdDevYrecord componentstdDevRot- the value for thestdDevRotrecord 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 '=='. -
visionPose
Returns the value of thevisionPoserecord component.- Returns:
- the value of the
visionPoserecord component
-
timestamp
public double timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
cameraId
public int cameraId()Returns the value of thecameraIdrecord component.- Returns:
- the value of the
cameraIdrecord component
-
tagCount
public int tagCount()Returns the value of thetagCountrecord component.- Returns:
- the value of the
tagCountrecord component
-
stdDevX
public double stdDevX()Returns the value of thestdDevXrecord component.- Returns:
- the value of the
stdDevXrecord component
-
stdDevY
public double stdDevY()Returns the value of thestdDevYrecord component.- Returns:
- the value of the
stdDevYrecord component
-
stdDevRot
public double stdDevRot()Returns the value of thestdDevRotrecord component.- Returns:
- the value of the
stdDevRotrecord component
-