Enum Class ShotCalculator.SetShot

java.lang.Object
java.lang.Enum<ShotCalculator.SetShot>
frc.rebuilt.ShotCalculator.SetShot
All Implemented Interfaces:
Serializable, Comparable<ShotCalculator.SetShot>, Constable
Enclosing class:
ShotCalculator

public static enum ShotCalculator.SetShot extends Enum<ShotCalculator.SetShot>
The fixed shots, one per parking spot, from the offseason bot's set shots (463c465, fa1376b) less its hub-face shot, which FM cannot make. Spots are for blue. Each gives where to park the robot centre, and the heading that points the launcher (FM's back) at the hub centre. Red rotates the spot about the field centre. The hood and flywheel are not stored here: they are FM's selected hub model evaluated at the spot's range at a standstill (ShotCalculator.setShotSolution(ShotCalculator.PolyModel, double)), so a set shot follows the shot map, and the operator's hood trim, without anyone retyping numbers.

The driver aims, as on the offseason bot: park where the spot says, point the back of the robot at the hub (the heading below), hold the chord. Nothing reads the pose, so the shot is only as good as the parking. The model moves about 0.5 deg of hood and 35 RPM per 15 cm here, so lining up by eye against the field element is good enough.

Hub centre: Field.BlueHub (the midpoint of tags 26 and 20, 4.626, 4.035 m).

  • Enum Constant Details

    • TOWER

      public static final ShotCalculator.SetShot TOWER
      Intake (front bumper) against the tower's field-facing wall, on its centreline, back of the robot to the hub: (1.525, 3.746) m, 3.11 m out. Squared up to the wall the launcher points 5.3 deg right of the hub, so turn the robot about 5 deg counter-clockwise (from above) off square.
    • LEFT_TRENCH

      public static final ShotCalculator.SetShot LEFT_TRENCH
      In the left trench lane (the driver's left: +y on blue) just clear of the trench on the alliance side, intake to the wall, back to the hub. Lane centre is half the 50.34 in opening from the wall; the trench is the hub's 47 in deep, centred on the hub's x. (3.609, 7.430) m, 3.54 m out. CALIBRATE both: the offseason bot used the same spot, 3.53 m with its smaller frame.
    • RIGHT_TRENCH

      public static final ShotCalculator.SetShot RIGHT_TRENCH
      Mirror of LEFT_TRENCH across the field's long centreline.
  • Field Details

    • label

      public final String label
      Short name, logged to ShotCalc/SetShot.
    • bluePose

      public final Pose2d bluePose
      Where to park on the blue side, and the heading to hold there.
    • distanceMeters

      public final double distanceMeters
      Robot centre (the launcher: robotToLauncher is zero) to the hub centre.
  • Method Details

    • values

      public static ShotCalculator.SetShot[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ShotCalculator.SetShot valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • pose

      public Pose2d pose()
      The spot and heading for the alliance the robot is on (rotated about centre for red).