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 aCameraConstants
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the value of thecalibErrorAvg
record component.double
Returns the value of thecalibErrorStdDev
record component.double
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theframesPerSecond
record component.final int
hashCode()
Returns a hash code value for this object.int
height()
Returns the value of theheight
record component.Returns the value of thehorizontalFieldOfView
record component.Returns the value of thelatencyAvg
record component.Returns the value of thelatencyStdDev
record component.name()
Returns the value of thename
record component.double
offset()
Returns the value of theoffset
record component.Returns the value of therobotToCamera
record component.final String
toString()
Returns a string representation of this record class.int
width()
Returns the value of thewidth
record 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 aCameraConstants
record class.- Parameters:
name
- the value for thename
record componentheight
- the value for theheight
record componentwidth
- the value for thewidth
record componenthorizontalFieldOfView
- the value for thehorizontalFieldOfView
record componentframesPerSecond
- the value for theframesPerSecond
record componentlatencyAvg
- the value for thelatencyAvg
record componentlatencyStdDev
- the value for thelatencyStdDev
record componentcalibErrorAvg
- the value for thecalibErrorAvg
record componentcalibErrorStdDev
- the value for thecalibErrorStdDev
record componentrobotToCamera
- the value for therobotToCamera
record componentoffset
- the value for theoffset
record 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 thename
record component.- Returns:
- the value of the
name
record component
-
height
public int height()Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
width
public int width()Returns the value of thewidth
record component.- Returns:
- the value of the
width
record component
-
horizontalFieldOfView
Returns the value of thehorizontalFieldOfView
record component.- Returns:
- the value of the
horizontalFieldOfView
record component
-
framesPerSecond
Returns the value of theframesPerSecond
record component.- Returns:
- the value of the
framesPerSecond
record component
-
latencyAvg
Returns the value of thelatencyAvg
record component.- Returns:
- the value of the
latencyAvg
record component
-
latencyStdDev
Returns the value of thelatencyStdDev
record component.- Returns:
- the value of the
latencyStdDev
record component
-
calibErrorAvg
public double calibErrorAvg()Returns the value of thecalibErrorAvg
record component.- Returns:
- the value of the
calibErrorAvg
record component
-
calibErrorStdDev
public double calibErrorStdDev()Returns the value of thecalibErrorStdDev
record component.- Returns:
- the value of the
calibErrorStdDev
record component
-
robotToCamera
Returns the value of therobotToCamera
record component.- Returns:
- the value of the
robotToCamera
record component
-
offset
public double offset()Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-