Package frc.robot
Record Class RobotUtils.ArticulatedPose
java.lang.Object
java.lang.Record
frc.robot.RobotUtils.ArticulatedPose
- Enclosing class:
- RobotUtils
public static record RobotUtils.ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, edu.wpi.first.math.geometry.Pose3d[] component_poses)
extends Record
A convenience class for storing a pose along with its mechanism positions.
-
Constructor Summary
ConstructorsConstructorDescriptionArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose) ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, double elevator_height, double intake_angle) ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, edu.wpi.first.math.geometry.Pose3d[] component_poses) Creates an instance of aArticulatedPoserecord class.ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, edu.wpi.first.math.geometry.Pose3d pose1, edu.wpi.first.math.geometry.Pose3d pose2, edu.wpi.first.math.geometry.Pose3d pose3, edu.wpi.first.math.geometry.Pose3d pose4) -
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.geometry.Pose3d[]Returns the value of thecomponent_posesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidpublish(edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose2d> pose_pub, edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d> components_pub) edu.wpi.first.math.geometry.Pose2dReturns the value of therobot_poserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArticulatedPose
public ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, edu.wpi.first.math.geometry.Pose3d pose1, edu.wpi.first.math.geometry.Pose3d pose2, edu.wpi.first.math.geometry.Pose3d pose3, edu.wpi.first.math.geometry.Pose3d pose4) -
ArticulatedPose
public ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, double elevator_height, double intake_angle) -
ArticulatedPose
public ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose) -
ArticulatedPose
public ArticulatedPose(edu.wpi.first.math.geometry.Pose2d robot_pose, edu.wpi.first.math.geometry.Pose3d[] component_poses) Creates an instance of aArticulatedPoserecord class.- Parameters:
robot_pose- the value for therobot_poserecord componentcomponent_poses- the value for thecomponent_posesrecord component
-
-
Method Details
-
publish
public void publish(edu.wpi.first.networktables.StructPublisher<edu.wpi.first.math.geometry.Pose2d> pose_pub, edu.wpi.first.networktables.StructArrayPublisher<edu.wpi.first.math.geometry.Pose3d> components_pub) -
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). -
robot_pose
public edu.wpi.first.math.geometry.Pose2d robot_pose()Returns the value of therobot_poserecord component.- Returns:
- the value of the
robot_poserecord component
-
component_poses
public edu.wpi.first.math.geometry.Pose3d[] component_poses()Returns the value of thecomponent_posesrecord component.- Returns:
- the value of the
component_posesrecord component
-