Package org.chsrobotics.lib.models
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 Summary
ConstructorsConstructorDescriptionRRConfiguration(double localAngle, double distalAngle, double endEffectorAngle, double endEffectorX, double endEffectorY) Creates an instance of aRRConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedistalAnglerecord component.doubleReturns the value of theendEffectorAnglerecord component.doubleReturns the value of theendEffectorXrecord component.doubleReturns the value of theendEffectorYrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thelocalAnglerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RRConfiguration
public RRConfiguration(double localAngle, double distalAngle, double endEffectorAngle, double endEffectorX, double endEffectorY) Creates an instance of aRRConfigurationrecord class.- Parameters:
localAngle- the value for thelocalAnglerecord componentdistalAngle- the value for thedistalAnglerecord componentendEffectorAngle- the value for theendEffectorAnglerecord componentendEffectorX- the value for theendEffectorXrecord componentendEffectorY- the value for theendEffectorYrecord 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. All components in this record class are compared with '=='. -
localAngle
public double localAngle()Returns the value of thelocalAnglerecord component.- Returns:
- the value of the
localAnglerecord component
-
distalAngle
public double distalAngle()Returns the value of thedistalAnglerecord component.- Returns:
- the value of the
distalAnglerecord component
-
endEffectorAngle
public double endEffectorAngle()Returns the value of theendEffectorAnglerecord component.- Returns:
- the value of the
endEffectorAnglerecord component
-
endEffectorX
public double endEffectorX()Returns the value of theendEffectorXrecord component.- Returns:
- the value of the
endEffectorXrecord component
-
endEffectorY
public double endEffectorY()Returns the value of theendEffectorYrecord component.- Returns:
- the value of the
endEffectorYrecord component
-