Package frc.robot.subsystems.intake.arm
Class ArmConstants
java.lang.Object
frc.robot.subsystems.intake.arm.ArmConstants
Hardware and tuning constants for the intake subsystem.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DistanceLength of the arm.static final MomentOfInertiaMoment of inertia for the arm.static final intCAN ID for the arm lifting motor.static final AngularVelocityMaximum angular velocity for the arm during movement.static final AngleAngle of the arm when fully deployed for intaking.static final AngleMaximum allowable error between internal and absolute encoder positions.static final DCMotorThe motor model and quantity used for the arm gearbox.static final doubleAbsolute encoder offset.static final doubleConverts absolute encoder position to radians for the arm.static final doubleGear ratio from internal encoder to global encoder.static final doubleConverts absolute encoder velocity (RPM) to radians per second for the arm.static final doubleConverts internal motor rotations to radians for the arm.static final doubleConverts internal motor velocity (RPM) to radians per second for the arm.static final doubleAcceleration feedforward gain for the arm.static final doubleDerivative gain for arm position control.static final doubleGravity feedforward gain for the arm.static final doubleProportional gain for arm position control.static final doubleStatic friction feedforward gain for the arm.static final doubleVelocity feedforward gain for the arm.static final AngularAccelerationMaximum angular acceleration for the arm during movement.static final CurrentMax current draw for the arm motor.static final booleanWhether the arm motor is inverted.static final doubleGear ratio from global encoder to output shaft.static final AngleTolerance for considering the arm at a specific PID setpoint.static final AngleAngle of the arm when fully retracted inside the robot perimeter.static final AngleSafety buffer for soft limits.static final AngleTolerance for considering the arm to be physically in the desired state.static final doubleGear ratio from internal encoder to output shaft.static final AngularVelocityMaximum angular velocity for the arm to be considered "still". -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
CAN_ID
public static final int CAN_IDCAN ID for the arm lifting motor.- See Also:
-
MOTOR_INVERTED
public static final boolean MOTOR_INVERTEDWhether the arm motor is inverted.- See Also:
-
GLOBAL_ENCODER_REDUCTION
public static final double GLOBAL_ENCODER_REDUCTIONGear ratio from internal encoder to global encoder.- See Also:
-
OUTPUT_SHAFT_REDUCTION
public static final double OUTPUT_SHAFT_REDUCTIONGear ratio from global encoder to output shaft.- See Also:
-
TOTAL_REDUCTION
public static final double TOTAL_REDUCTIONGear ratio from internal encoder to output shaft.- See Also:
-
INTERNAL_ENCODER_POSITION_FACTOR
public static final double INTERNAL_ENCODER_POSITION_FACTORConverts internal motor rotations to radians for the arm.- See Also:
-
INTERNAL_ENCODER_VELOCITY_FACTOR
public static final double INTERNAL_ENCODER_VELOCITY_FACTORConverts internal motor velocity (RPM) to radians per second for the arm.- See Also:
-
GLOBAL_ENCODER_POSITION_FACTOR
public static final double GLOBAL_ENCODER_POSITION_FACTORConverts absolute encoder position to radians for the arm.- See Also:
-
GLOBAL_ENCODER_VELOCITY_FACTOR
public static final double GLOBAL_ENCODER_VELOCITY_FACTORConverts absolute encoder velocity (RPM) to radians per second for the arm.- See Also:
-
GLOBAL_ENCODER_OFFSET
public static final double GLOBAL_ENCODER_OFFSETAbsolute encoder offset.- See Also:
-
MOTOR_CURRENT_LIMIT
Max current draw for the arm motor. -
KP
public static final double KPProportional gain for arm position control.- See Also:
-
KD
public static final double KDDerivative gain for arm position control.- See Also:
-
KS
public static final double KSStatic friction feedforward gain for the arm.- See Also:
-
KG
public static final double KGGravity feedforward gain for the arm.- See Also:
-
KV
public static final double KVVelocity feedforward gain for the arm.- See Also:
-
KA
public static final double KAAcceleration feedforward gain for the arm.- See Also:
-
CRUISE_VELOCITY
Maximum angular velocity for the arm during movement. -
MAX_ACCELERATION
Maximum angular acceleration for the arm during movement. -
DEPLOYED_POSITION
Angle of the arm when fully deployed for intaking. -
RETRACTED_POSITION
Angle of the arm when fully retracted inside the robot perimeter. -
PID_TOLERANCE
Tolerance for considering the arm at a specific PID setpoint. -
STATE_TOLERANCE
Tolerance for considering the arm to be physically in the desired state. -
SOFT_LIMIT_TOLERANCE
Safety buffer for soft limits. -
GEARBOX
The motor model and quantity used for the arm gearbox. -
VELOCITY_GATE
Maximum angular velocity for the arm to be considered "still". -
ERROR_THRESHOLD
Maximum allowable error between internal and absolute encoder positions. -
ARM_LENGTH
Length of the arm. -
ARM_MOMENT_OF_INERTIA
Moment of inertia for the arm.
-
-
Constructor Details
-
ArmConstants
public ArmConstants()
-