Package frc.robot.logging
Class MechLogging
java.lang.Object
frc.robot.logging.MechLogging
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
static final double
-
Method Summary
Modifier and TypeMethodDescriptionedu.wpi.first.math.geometry.Pose3d
Get the pose of the climber ligament.edu.wpi.first.math.geometry.Pose3d
Get the primary elevator pose.edu.wpi.first.math.geometry.Pose3d
Get the secondary elevator pose.edu.wpi.first.math.geometry.Pose3d
Get the elevator stage 3 position.static MechLogging
Get the instance of the singleton class.edu.wpi.first.math.geometry.Pose3d
Get the pose of the intake.edu.wpi.first.math.geometry.Pose3d
Get the pose of the outtake.edu.wpi.first.math.geometry.Pose3d[]
Getter for the array of poses we want to simulate.void
updateDrivetrainValues
(edu.wpi.first.math.geometry.Pose2d pose, edu.wpi.first.math.kinematics.ChassisSpeeds speeds, edu.wpi.first.math.geometry.Rotation2d rotation) Updates the drivetrain values.void
updateElevatorPose3d
(edu.wpi.first.units.measure.Angle encoderSimPosition) Generates the pose for the elevator based on encoder position.void
updatesClimberPose3d
(edu.wpi.first.units.measure.Angle encoderSimPosition) Updates the pose for the climber based on encoder position.
-
Field Details
-
STAGE_2_RATIO
public static final double STAGE_2_RATIO- See Also:
-
STAGE_3_RATIO
public static final double STAGE_3_RATIO- See Also:
-
-
Method Details
-
getInstance
Get the instance of the singleton class.- Returns:
- the instance
-
updateElevatorPose3d
public void updateElevatorPose3d(edu.wpi.first.units.measure.Angle encoderSimPosition) Generates the pose for the elevator based on encoder position.- Parameters:
encoderSimPosition
- the simulated location of the elevator motor encoder.
-
updatesClimberPose3d
public void updatesClimberPose3d(edu.wpi.first.units.measure.Angle encoderSimPosition) Updates the pose for the climber based on encoder position.- Parameters:
encoderSimPosition
- the simulated location of the climber motor encoder.
-
getElevatorStage1
public edu.wpi.first.math.geometry.Pose3d getElevatorStage1()Get the primary elevator pose.- Returns:
- the pose of the inner part of the elevator
-
getElevatorStage2
public edu.wpi.first.math.geometry.Pose3d getElevatorStage2()Get the secondary elevator pose.- Returns:
- the pose of the inner-most part of the elevator
-
getElevatorStage3
public edu.wpi.first.math.geometry.Pose3d getElevatorStage3()Get the elevator stage 3 position.- Returns:
- the elevator stage 3 position
-
getClimberPose
public edu.wpi.first.math.geometry.Pose3d getClimberPose()Get the pose of the climber ligament.- Returns:
- pose of the rotating climber ligament.
-
getIntakePose
public edu.wpi.first.math.geometry.Pose3d getIntakePose()Get the pose of the intake.- Returns:
- the pose of the intake
-
getOuttakePose
public edu.wpi.first.math.geometry.Pose3d getOuttakePose()Get the pose of the outtake.- Returns:
- the pose of the outtake
-
getRobotPoses
public edu.wpi.first.math.geometry.Pose3d[] getRobotPoses()Getter for the array of poses we want to simulate.- Returns:
- the array of poses to display in advantageScope
-
updateDrivetrainValues
public void updateDrivetrainValues(edu.wpi.first.math.geometry.Pose2d pose, edu.wpi.first.math.kinematics.ChassisSpeeds speeds, edu.wpi.first.math.geometry.Rotation2d rotation) Updates the drivetrain values.- Parameters:
pose
- the pose of the drivetrainspeeds
- the chassis speeds of the drivetrainrotation
- the rotation of the drivetrain
-