Record Class AprilTagVisionIO.TargetObservation
java.lang.Object
java.lang.Record
frc.robot.subsystems.apriltagvision.io.AprilTagVisionIO.TargetObservation
- Record Components:
tx- horizontal (yaw) angle from the camera center to the targetty- vertical (pitch) angle from the camera center to the target
- Enclosing interface:
- AprilTagVisionIO
public static record AprilTagVisionIO.TargetObservation(edu.wpi.first.math.geometry.Rotation2d tx, edu.wpi.first.math.geometry.Rotation2d ty)
extends Record
Represents the yaw and pitch angles to a detected target.
-
Constructor Summary
ConstructorsConstructorDescriptionTargetObservation(edu.wpi.first.math.geometry.Rotation2d tx, edu.wpi.first.math.geometry.Rotation2d ty) Creates an instance of aTargetObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.edu.wpi.first.math.geometry.Rotation2dtx()Returns the value of thetxrecord component.edu.wpi.first.math.geometry.Rotation2dty()Returns the value of thetyrecord component.
-
Constructor Details
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
tx
public edu.wpi.first.math.geometry.Rotation2d tx()Returns the value of thetxrecord component.- Returns:
- the value of the
txrecord component
-
ty
public edu.wpi.first.math.geometry.Rotation2d ty()Returns the value of thetyrecord component.- Returns:
- the value of the
tyrecord component
-