Class ShooterValues

java.lang.Object
frc.robot.superstructure.ShooterValues

public class ShooterValues extends Object
An object that represents a state that the shooter can be in. This includes the flywheel speed, turret position, and hood position.
  • Constructor Details

    • ShooterValues

      public ShooterValues()
      Creates a new ShooterValues with zero values.
    • ShooterValues

      public ShooterValues(AngularVelocity flywheelSpeed, Angle hoodAngle, Angle turretAngle)
      Creates a new ShooterValues with specified values.
      Parameters:
      flywheelSpeed - The velocity to spin the flywheel up to.
      hoodAngle - The angle to set the hood to.
      turretAngle - The angle to point the turret at.
  • Method Details

    • setFlywheelSpeed

      public ShooterValues setFlywheelSpeed(AngularVelocity flywheelSpeed)
      Sets the flywheel speed to a specific AngularVelocity.
      Parameters:
      flywheelSpeed - The velocity to spin the flywheel up to.
      Returns:
      This object for method chaining.
    • setGamepieceSpeed

      public ShooterValues setGamepieceSpeed(LinearVelocity gamepieceSpeed)
      Sets the flywheel speed as a LinearVelocity to shoot the gamepiece at (exit velocity).
      Parameters:
      gamepieceSpeed - The velocity to shoot the gamepiece at.
      Returns:
      This object for method chaining.
    • setTurretAngle

      public ShooterValues setTurretAngle(Angle turretAngle)
      Sets the turret angle.
      Parameters:
      turretAngle - The angle to point the turret at.
      Returns:
      This object for method chaining.
    • setHoodAngle

      public ShooterValues setHoodAngle(Angle hoodAngle)
      Sets the hood angle.
      Parameters:
      hoodAngle - The angle to set the hood to.
      Returns:
      This object for method chaining.
    • setGamepieceTheta

      public ShooterValues setGamepieceTheta(Angle gamepieceTheta)
      Sets the hood angle as an Angle to shoot the gamepiece at (exit angle).
      Parameters:
      gamepieceTheta - The angle to shoot the gamepiece at.
      Returns:
      This object for method chaining.
    • getFlywheelSpeed

      public AngularVelocity getFlywheelSpeed()
      Gets the flywheel speed.
      Returns:
      The flywheel speed.
    • getTurretAngle

      public Angle getTurretAngle()
      Gets the turret angle.
      Returns:
      The turret angle.
    • getHoodAngle

      public Angle getHoodAngle()
      Gets the hood angle.
      Returns:
      The hood angle.
    • toString

      public String toString()
      Overrides:
      toString in class Object