Package frc.robot.services.vision
Record Class VisionConstants.CameraConfig
java.lang.Object
java.lang.Record
frc.robot.services.vision.VisionConstants.CameraConfig
- Record Components:
name- The human-readable name of the camera.robotToCamera- The transform from the robot center to the camera lens.fovDegrees- The horizontal field of view of the camera in degrees.maxRangeMeters- The maximum distance the camera can reliably detect AprilTags.
- Enclosing class:
- VisionConstants
public static record VisionConstants.CameraConfig(String name, Transform3d robotToCamera, double fovDegrees, double maxRangeMeters)
extends Record
Defines the physical and operational parameters of a camera.
-
Constructor Summary
ConstructorsConstructorDescriptionCameraConfig(String name, Transform3d robotToCamera, double fovDegrees, double maxRangeMeters) Creates an instance of aCameraConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thefovDegreesrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themaxRangeMetersrecord component.name()Returns the value of thenamerecord component.Returns the value of therobotToCamerarecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CameraConfig
public CameraConfig(String name, Transform3d robotToCamera, double fovDegrees, double maxRangeMeters) Creates an instance of aCameraConfigrecord class.- Parameters:
name- the value for thenamerecord componentrobotToCamera- the value for therobotToCamerarecord componentfovDegrees- the value for thefovDegreesrecord componentmaxRangeMeters- the value for themaxRangeMetersrecord 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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
robotToCamera
Returns the value of therobotToCamerarecord component.- Returns:
- the value of the
robotToCamerarecord component
-
fovDegrees
public double fovDegrees()Returns the value of thefovDegreesrecord component.- Returns:
- the value of the
fovDegreesrecord component
-
maxRangeMeters
public double maxRangeMeters()Returns the value of themaxRangeMetersrecord component.- Returns:
- the value of the
maxRangeMetersrecord component
-