Package frc.robot.systems.vision
Record Class Vision.VisionObservation
java.lang.Object
java.lang.Record
frc.robot.systems.vision.Vision.VisionObservation
- Enclosing class:
- Vision
-
Constructor Summary
ConstructorsConstructorDescriptionVisionObservation(boolean hasObserved, edu.wpi.first.math.geometry.Pose2d pose, edu.wpi.first.math.Vector<edu.wpi.first.math.numbers.N3> stdDevs, double timeStamp, String camName) Creates an instance of aVisionObservationrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncamName()Returns the value of thecamNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasObservedrecord component.edu.wpi.first.math.geometry.Pose2dpose()Returns the value of theposerecord component.edu.wpi.first.math.Vector<edu.wpi.first.math.numbers.N3>stdDevs()Returns the value of thestdDevsrecord component.doubleReturns the value of thetimeStamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VisionObservation
public VisionObservation(boolean hasObserved, edu.wpi.first.math.geometry.Pose2d pose, edu.wpi.first.math.Vector<edu.wpi.first.math.numbers.N3> stdDevs, double timeStamp, String camName) Creates an instance of aVisionObservationrecord class.- Parameters:
hasObserved- the value for thehasObservedrecord componentpose- the value for theposerecord componentstdDevs- the value for thestdDevsrecord componenttimeStamp- the value for thetimeStamprecord componentcamName- the value for thecamNamerecord 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 '=='. -
hasObserved
public boolean hasObserved()Returns the value of thehasObservedrecord component.- Returns:
- the value of the
hasObservedrecord component
-
pose
public edu.wpi.first.math.geometry.Pose2d pose()Returns the value of theposerecord component.- Returns:
- the value of the
poserecord component
-
stdDevs
public edu.wpi.first.math.Vector<edu.wpi.first.math.numbers.N3> stdDevs()Returns the value of thestdDevsrecord component.- Returns:
- the value of the
stdDevsrecord component
-
timeStamp
public double timeStamp()Returns the value of thetimeStamprecord component.- Returns:
- the value of the
timeStamprecord component
-
camName
Returns the value of thecamNamerecord component.- Returns:
- the value of the
camNamerecord component
-