Class ShooterConstants

java.lang.Object
frc.robot.subsystems.shooter.ShooterConstants

public final class ShooterConstants extends Object
Physical constants and hardware configurations for the shooter subsystem.

Includes data on the game piece, actuator geometry, gear ratios, and motor controller settings.

  • Field Details

    • CAN_ID

      public static final int CAN_ID
      CAN ID for the flywheel motor controller.
      See Also:
    • SERVO_CHANNEL

      public static final int SERVO_CHANNEL
      PWM channel for the hood servo motor.
      See Also:
    • FLYWHEEL_INVERTED

      public static final boolean FLYWHEEL_INVERTED
      Whether the flywheel motor is inverted.
      See Also:
    • CRANK_ARM_LENGTH

      public static final Distance CRANK_ARM_LENGTH
      Length of the cranking arm in the hood mechanism.
    • CRANK_TANGENT_TO_LAUNCH_ANGLE

      public static final Angle CRANK_TANGENT_TO_LAUNCH_ANGLE
      Offset angle between the crank tangent and the actual launch angle.
    • HOOD_TOTAL_ANGLE

      public static final Angle HOOD_TOTAL_ANGLE
      Total angular range of the hood mechanism.
    • SERVO_MIN_LENGTH

      public static final Distance SERVO_MIN_LENGTH
      Minimum physical length of the hood servo actuator.
    • SERVO_MAX_LENGTH

      public static final Distance SERVO_MAX_LENGTH
      Maximum physical length of the hood servo actuator.
    • MAX_SERVO_VELOCITY

      public static final LinearVelocity MAX_SERVO_VELOCITY
      Maximum linear speed of the hood servo actuator.
    • HOOD_LENGTH_TOLERANCE

      public static final Distance HOOD_LENGTH_TOLERANCE
      Tolerance for the hood servo actuator length.
    • GEARBOX

      public static final DCMotor GEARBOX
      Motor model for the flywheel (Neo Vortex driven by SparkFlex).
    • REDUCTION

      public static final double REDUCTION
      Gear reduction ratio for the flywheel (motor to wheel).
      See Also:
    • MOI

      public static final MomentOfInertia MOI
      Moment of inertia of the flywheel assembly.
    • WHEEL_RADIUS

      public static final Distance WHEEL_RADIUS
      Radius of the flywheel driving wheel.
    • ANGULAR_TOLERANCE

      public static final AngularVelocity ANGULAR_TOLERANCE
      Allowed velocity error before the shooter is considered "ready".
    • MOTOR_CURRENT_LIMIT

      public static final Current MOTOR_CURRENT_LIMIT
      Maximum current limit for the flywheel motor.
    • FLYWHEEL_ENCODER_POSITION_FACTOR

      public static final double FLYWHEEL_ENCODER_POSITION_FACTOR
      Converts motor rotations to mechanism radians.
      See Also:
    • FLYWHEEL_ENCODER_VELOCITY_FACTOR

      public static final double FLYWHEEL_ENCODER_VELOCITY_FACTOR
      Converts motor RPM to mechanism rad/s.
      See Also:
    • FLYWHEEL_KP

      public static final double FLYWHEEL_KP
      Proportional gain for flywheel velocity control.
      See Also:
    • FLYWHEEL_KI

      public static final double FLYWHEEL_KI
      Integral gain for flywheel velocity control.
      See Also:
    • FLYWHEEL_KD

      public static final double FLYWHEEL_KD
      Derivative gain for flywheel velocity control.
      See Also:
    • FLYWHEEL_KS

      public static final double FLYWHEEL_KS
      Static friction feedforward gain for the flywheel.
      See Also:
    • FLYWHEEL_KV

      public static final double FLYWHEEL_KV
      Velocity feedforward gain for the flywheel.
      See Also:
    • FLYWHEEL_KA

      public static final double FLYWHEEL_KA
      Acceleration feedforward gain for the flywheel.
      See Also:
    • LOB_STATE

      public static final Shooter.ShooterState LOB_STATE
      Preset shooter state for lobbing game pieces into the coral station.
    • DEFAULT_STATE

      public static final Shooter.ShooterState DEFAULT_STATE
      Default shooter state with zero velocity and angle.
    • ESTIMATED_TOF

      public static final Time ESTIMATED_TOF
      Estimated time of flight for the game piece from shooter to target.
    • SHOOTER_ROBOT_OFFSET

      public static final Translation2d SHOOTER_ROBOT_OFFSET
      Position of the shooter on the robot relative to the robot center (robot-frame). X is forward, Y is left.
  • Constructor Details

    • ShooterConstants

      public ShooterConstants()