Record Class DoubleJointedArmKinematics.RRConfiguration

java.lang.Object
java.lang.Record
org.chsrobotics.lib.models.DoubleJointedArmKinematics.RRConfiguration
Record Components:
localAngle - Angle of the local joint (the joint connected to the root), in radians, from (counterclockwise) the horizontal (or the positive x-axis in non-vertically oriented setups).
distalAngle - Angle of the distal joint (the joint between arm segments), in radians, from (counterclockwise) parallel with the local joint.
endEffectorAngle - Angle of the end effector, in radians, from (counterclockwise) the horizontal (or the positive x-axis in non-vertically oriented setups).
endEffectorX - The x-position of the end effector in Cartesian space.
endEffectorY - The y-position of the end effector in Cartesian space.
Enclosing class:
DoubleJointedArmKinematics

public static record DoubleJointedArmKinematics.RRConfiguration(double localAngle, double distalAngle, double endEffectorAngle, double endEffectorX, double endEffectorY) extends Record
Data class holding information about the state of a double revolute-jointed arm.
  • Constructor Details

    • RRConfiguration

      public RRConfiguration(double localAngle, double distalAngle, double endEffectorAngle, double endEffectorX, double endEffectorY)
      Creates an instance of a RRConfiguration record class.
      Parameters:
      localAngle - the value for the localAngle record component
      distalAngle - the value for the distalAngle record component
      endEffectorAngle - the value for the endEffectorAngle record component
      endEffectorX - the value for the endEffectorX record component
      endEffectorY - the value for the endEffectorY record component
  • Method Details

    • 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. All components in this record class 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.
    • localAngle

      public double localAngle()
      Returns the value of the localAngle record component.
      Returns:
      the value of the localAngle record component
    • distalAngle

      public double distalAngle()
      Returns the value of the distalAngle record component.
      Returns:
      the value of the distalAngle record component
    • endEffectorAngle

      public double endEffectorAngle()
      Returns the value of the endEffectorAngle record component.
      Returns:
      the value of the endEffectorAngle record component
    • endEffectorX

      public double endEffectorX()
      Returns the value of the endEffectorX record component.
      Returns:
      the value of the endEffectorX record component
    • endEffectorY

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