Package frc.robot.localization
Record Class VisionObservation
java.lang.Object
java.lang.Record
frc.robot.localization.VisionObservation
public record VisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp)
extends Record
Vision Observation Record
-
Constructor Summary
ConstructorsConstructorDescriptionVisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp) Creates an instance of aVisionObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecameraPoserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therobotToCamerarecord component.doubleReturns the value of therotationStdDevrecord component.doubleReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetranslationStdDevrecord component.
-
Constructor Details
-
VisionObservation
public VisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp) Creates an instance of aVisionObservationrecord class.- Parameters:
cameraPose- the value for thecameraPoserecord componentrobotToCamera- the value for therobotToCamerarecord componenttranslationStdDev- the value for thetranslationStdDevrecord componentrotationStdDev- the value for therotationStdDevrecord componenttimestamp- the value for thetimestamprecord component
-
-
Method Details
-
getStdDev
-
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 '=='. -
cameraPose
Returns the value of thecameraPoserecord component.- Returns:
- the value of the
cameraPoserecord component
-
robotToCamera
Returns the value of therobotToCamerarecord component.- Returns:
- the value of the
robotToCamerarecord component
-
translationStdDev
public double translationStdDev()Returns the value of thetranslationStdDevrecord component.- Returns:
- the value of the
translationStdDevrecord component
-
rotationStdDev
public double rotationStdDev()Returns the value of therotationStdDevrecord component.- Returns:
- the value of the
rotationStdDevrecord component
-
timestamp
public double timestamp()Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-