Package frc.robot

Class Constants.TurretConstants

java.lang.Object
frc.robot.Constants.TurretConstants
Enclosing class:
Constants

public static class Constants.TurretConstants extends Object
Constants used to configure the turret.
  • Field Details

    • MOTOR_ID

      public static final int MOTOR_ID
      The CAN ID for the turret motor.
      See Also:
    • CANDI_ID

      public static final int CANDI_ID
      The CAN ID for the encoder CANdi.
      See Also:
    • TURRET_OFFSET

      public static final Transform3d TURRET_OFFSET
      The turret's offset from the center of the robot (drivetrain pose).
    • TURRET_GEAR_TEETH

      public static final double TURRET_GEAR_TEETH
      The number of teeth on the main turret gear.
      See Also:
    • PINION_UPPER_TEETH

      public static final double PINION_UPPER_TEETH
      The number of teeth on the pinion gear, interfacing with the main turret gear.
      See Also:
    • PINION_LOWER_TEETH

      public static final double PINION_LOWER_TEETH
      The number of teeth on the lower pinion gear. This is 1:1 with the upper pinion gear.
      See Also:
    • MOTOR_GEAR_TEETH

      public static final double MOTOR_GEAR_TEETH
      The number of teeth on the gear on the turret motor and primary encoder.
      See Also:
    • SECONDARY_ENCODER_GEAR_TEETH

      public static final double SECONDARY_ENCODER_GEAR_TEETH
      The number of teeth on the secondary encoder's gear.
      See Also:
    • MOTOR_GEAR_RATIO

      public static final double MOTOR_GEAR_RATIO
      The ratio of motor turns to mechanism rotations.
    • MOTOR_TO_PRIMARY_ENCODER_RATIO

      public static final double MOTOR_TO_PRIMARY_ENCODER_RATIO
      The number of primary encoder rotations per motor rotation.
      See Also:
    • PRIMARY_ENCODER_RATIO

      public static final double PRIMARY_ENCODER_RATIO
      The number of encoder rotations per mechanism rotation for the primary encoder.
      See Also:
    • SECONDARY_ENCODER_RATIO

      public static final double SECONDARY_ENCODER_RATIO
      The number of encoder rotations per mechanism rotation for the secondary encoder.
      See Also:
    • TURRET_SPAN

      public static final double TURRET_SPAN
      the total span of the encoders tracking range, can be found by finding the lcm of the encoder ratios
      See Also:
    • TURRET_ENCODER_TOLERANCE

      public static final Angle TURRET_ENCODER_TOLERANCE
      the tolerance for turret encoders to consider values the same, increase if its returning null, as that means there is too much slop in the system
    • PRIMARY_ENCODER_OFFSET

      public static final Angle PRIMARY_ENCODER_OFFSET
      The offset from zero of the absolute encoder. This is in mechanism rotations.
    • SECONDARY_ENCODER_OFFSET

      public static final Angle SECONDARY_ENCODER_OFFSET
      The offset from zero of the absolute encoder. This is in mechanism rotations.
    • MOTOR_NEUTRAL_MODE

      public static final NeutralModeValue MOTOR_NEUTRAL_MODE
      The neutral mode for the motor.
    • MOTOR_INVERTED

      public static final InvertedValue MOTOR_INVERTED
      The direction of the motor.
    • MOTOR_CURRENT_HIGHER_LIMIT

      public static final Current MOTOR_CURRENT_HIGHER_LIMIT
      The higher current limit for the motor. Helps get the motor started before switching to the MOTOR_CURRENT_LOWER_LIMIT.
    • MOTOR_CURRENT_LOWER_LIMIT

      public static final Current MOTOR_CURRENT_LOWER_LIMIT
      The lower current limit for the motor.
    • MOTOR_CURRENT_LOWER_TIME

      public static final Time MOTOR_CURRENT_LOWER_TIME
      The time to supply the MOTOR_CURRENT_HIGHER_LIMIT for before switching to the MOTOR_CURRENT_LOWER_LIMIT.
    • MOTOR_STATOR_CURRENT_LIMIT

      public static final Current MOTOR_STATOR_CURRENT_LIMIT
      The stator current limit of the motor. This limits the current to the windings, which should help prevent burnout.
    • TURRET_KP

      public static final double TURRET_KP
      The PID kP for the turret closed loop controller.
      See Also:
    • TURRET_KI

      public static final double TURRET_KI
      The PID kI for the turret closed loop controller.
      See Also:
    • TURRET_KD

      public static final double TURRET_KD
      The PID kD for the turret closed loop controller.
      See Also:
    • TURRET_KS

      public static final double TURRET_KS
      The PID kS for the turret closed loop controller.
      See Also:
    • TURRET_KV

      public static final double TURRET_KV
      The PID kV for the turret closed loop controller.
      See Also:
    • TURRET_KA

      public static final double TURRET_KA
      The PID kA for the turret closed loop controller.
      See Also:
    • CRUISE_VELOCITY

      public static final AngularVelocity CRUISE_VELOCITY
      The peak/cruising velocity of the motion.
    • ACCELERATION

      public static final AngularAcceleration ACCELERATION
      The acceleration and deceleration rates during the beginning and end of motion.
    • JERK

      public static final Velocity<AngularAccelerationUnit> JERK
      Jerk (derivative of acceleration).
    • MINIMUM_ANGLE

      public static final Angle MINIMUM_ANGLE
      The lowest angle the turret can rotate to.
    • MAXIMUM_ANGLE

      public static final Angle MAXIMUM_ANGLE
      The highest angle the turret can rotate to.
    • SETPOINT_THRESHOLD

      public static final Measure<AngleUnit> SETPOINT_THRESHOLD
      How close does the Turret have to be to its setpoint to be counted as being there.
  • Constructor Details

    • TurretConstants

      public TurretConstants()