Package frc.robot
Record Class Constants.Vision.CameraConstants
java.lang.Object
java.lang.Record
frc.robot.Constants.Vision.CameraConstants
- Enclosing class:
- Constants.Vision
public static record Constants.Vision.CameraConstants(String name, int height, int width, Rotation2d horizontalFieldOfView, Frequency framesPerSecond, Time latencyAvg, Time latencyStdDev, double calibErrorAvg, double calibErrorStdDev, Transform3d robotToCamera, double offset)
extends Record
Constants for an individual camera.
-
Constructor Summary
ConstructorsConstructorDescriptionCameraConstants(String name, int height, int width, Rotation2d horizontalFieldOfView, Frequency framesPerSecond, Time latencyAvg, Time latencyStdDev, double calibErrorAvg, double calibErrorStdDev, Transform3d robotToCamera, double offset) Creates an instance of aCameraConstantsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecalibErrorAvgrecord component.doubleReturns the value of thecalibErrorStdDevrecord component.doublefinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theframesPerSecondrecord component.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.Returns the value of thehorizontalFieldOfViewrecord component.Returns the value of thelatencyAvgrecord component.Returns the value of thelatencyStdDevrecord component.name()Returns the value of thenamerecord component.doubleoffset()Returns the value of theoffsetrecord component.Returns the value of therobotToCamerarecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
CameraConstants
public CameraConstants(String name, int height, int width, Rotation2d horizontalFieldOfView, Frequency framesPerSecond, Time latencyAvg, Time latencyStdDev, double calibErrorAvg, double calibErrorStdDev, Transform3d robotToCamera, double offset) Creates an instance of aCameraConstantsrecord class.- Parameters:
name- the value for thenamerecord componentheight- the value for theheightrecord componentwidth- the value for thewidthrecord componenthorizontalFieldOfView- the value for thehorizontalFieldOfViewrecord componentframesPerSecond- the value for theframesPerSecondrecord componentlatencyAvg- the value for thelatencyAvgrecord componentlatencyStdDev- the value for thelatencyStdDevrecord componentcalibErrorAvg- the value for thecalibErrorAvgrecord componentcalibErrorStdDev- the value for thecalibErrorStdDevrecord componentrobotToCamera- the value for therobotToCamerarecord componentoffset- the value for theoffsetrecord component
-
-
Method Details
-
centerPixelYawRads
public double centerPixelYawRads() -
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
horizontalFieldOfView
Returns the value of thehorizontalFieldOfViewrecord component.- Returns:
- the value of the
horizontalFieldOfViewrecord component
-
framesPerSecond
Returns the value of theframesPerSecondrecord component.- Returns:
- the value of the
framesPerSecondrecord component
-
latencyAvg
Returns the value of thelatencyAvgrecord component.- Returns:
- the value of the
latencyAvgrecord component
-
latencyStdDev
Returns the value of thelatencyStdDevrecord component.- Returns:
- the value of the
latencyStdDevrecord component
-
calibErrorAvg
public double calibErrorAvg()Returns the value of thecalibErrorAvgrecord component.- Returns:
- the value of the
calibErrorAvgrecord component
-
calibErrorStdDev
public double calibErrorStdDev()Returns the value of thecalibErrorStdDevrecord component.- Returns:
- the value of the
calibErrorStdDevrecord component
-
robotToCamera
Returns the value of therobotToCamerarecord component.- Returns:
- the value of the
robotToCamerarecord component
-
offset
public double offset()Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-