Record Class VisionObservation

java.lang.Object
java.lang.Record
frc.robot.localization.VisionObservation

public record VisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp) extends Record
Vision Observation Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    VisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp)
    Creates an instance of a VisionObservation record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the cameraPose record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
     
    final int
    Returns a hash code value for this object.
    Returns the value of the robotToCamera record component.
    double
    Returns the value of the rotationStdDev record component.
    double
    Returns the value of the timestamp record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the translationStdDev record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • VisionObservation

      public VisionObservation(Pose3d cameraPose, Transform3d robotToCamera, double translationStdDev, double rotationStdDev, double timestamp)
      Creates an instance of a VisionObservation record class.
      Parameters:
      cameraPose - the value for the cameraPose record component
      robotToCamera - the value for the robotToCamera record component
      translationStdDev - the value for the translationStdDev record component
      rotationStdDev - the value for the rotationStdDev record component
      timestamp - the value for the timestamp record component
  • Method Details

    • getStdDev

      public Vector<N3> getStdDev()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cameraPose

      public Pose3d cameraPose()
      Returns the value of the cameraPose record component.
      Returns:
      the value of the cameraPose record component
    • robotToCamera

      public Transform3d robotToCamera()
      Returns the value of the robotToCamera record component.
      Returns:
      the value of the robotToCamera record component
    • translationStdDev

      public double translationStdDev()
      Returns the value of the translationStdDev record component.
      Returns:
      the value of the translationStdDev record component
    • rotationStdDev

      public double rotationStdDev()
      Returns the value of the rotationStdDev record component.
      Returns:
      the value of the rotationStdDev record component
    • timestamp

      public double timestamp()
      Returns the value of the timestamp record component.
      Returns:
      the value of the timestamp record component