Class HarvesterSubsystemConfig


public class HarvesterSubsystemConfig extends AbstractSetAndSeekSubsystemConfig
Configuration bundle for the harvester arm mechanism. Values are stored in degrees for readability but converted to radians at runtime where needed.

The harvester arm swings the intake rollers between an upright stowed position (inside the robot perimeter) and a lowered deployed position (outside the perimeter to grab Fuel from the floor). Named position fields provide the default stowed and deployed angles so commands do not hard-code magic numbers.

Because the arm fights gravity, this config adds a kG gain for use with ArmFeedforward. The horizontalOffsetDegrees field maps the encoder's zero position to the angle from horizontal so the gravity term is computed correctly.

  • Field Details

    • stowedPositionDegrees

      public double stowedPositionDegrees
      Arm angle when stowed upright inside the robot perimeter, in degrees. This is the match-start and default position.
    • deployedPositionDegrees

      public double deployedPositionDegrees
      Arm angle when deployed downward outside the robot perimeter to collect Fuel, in degrees.
    • sweepPositionDegrees

      public double sweepPositionDegrees
      Arm angle raised to push Fuel from the back of the hopper toward the shooting array, in degrees.
    • horizontalOffsetDegrees

      public double horizontalOffsetDegrees
      Angle offset from the encoder's zero position to the arm's horizontal reference, in degrees.

      WPILib's ArmFeedforward expects the arm angle measured from horizontal (0 degrees = parallel to the floor). If the encoder already reads zero when the arm is horizontal (deployed), the offset is 0 degrees. If the encoder reads zero when the arm is vertical (stowed upright), the offset would be 90 degrees.

    • deployedHoldToleranceDegrees

      public double deployedHoldToleranceDegrees
      Maximum allowed drift from the deployed position before the hold command re-engages, in degrees. A ball pushing the arm upward beyond this threshold triggers a profiled return to the deployed angle.
  • Constructor Details

    • HarvesterSubsystemConfig

      public HarvesterSubsystemConfig()
  • Method Details

    • getStowedPositionDegrees

      public double getStowedPositionDegrees()
      Returns the stowed arm position, tuned via SmartDashboard.
      Returns:
      stowed position in degrees (arm upright inside the frame)
    • getDeployedPositionDegrees

      public double getDeployedPositionDegrees()
      Returns the deployed arm position, tuned via SmartDashboard.
      Returns:
      deployed position in degrees (arm lowered outside the frame to collect Fuel)
    • getSweepPositionDegrees

      public double getSweepPositionDegrees()
      Returns the sweep arm position, tuned via SmartDashboard.
      Returns:
      sweep position in degrees (arm raised to push Fuel toward the shooting array)
    • getHorizontalOffsetRadians

      public double getHorizontalOffsetRadians()
      Returns the horizontal offset angle in radians.
      Returns:
      offset in radians added to the encoder position to obtain the angle from horizontal
    • getDeployedHoldToleranceDegrees

      public double getDeployedHoldToleranceDegrees()
      Returns the maximum drift from deployed position before re-engaging the motor, tuned via SmartDashboard.
      Returns:
      hold tolerance in degrees