Class HarvesterSubsystemConfig
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class frc.robot.shared.config.AbstractConfig
AbstractConfig.ComponentPoseConfig -
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleMaximum allowed drift from the deployed position before the hold command re-engages, in degrees.doubleArm angle when deployed downward outside the robot perimeter to collect Fuel, in degrees.doubleAngle offset from the encoder's zero position to the arm's horizontal reference, in degrees.doubleArm angle when stowed upright inside the robot perimeter, in degrees.doubleArm angle raised to push Fuel from the back of the hopper toward the shooting array, in degrees.Fields inherited from class frc.robot.shared.config.AbstractSetAndSeekSubsystemConfig
motionProfileFields inherited from class frc.robot.shared.config.AbstractMotorSubsystemConfig
feedforward, motorConfig, pid, sysIdFields inherited from class frc.robot.shared.config.AbstractSubsystemConfig
enabled, verbose -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the maximum drift from deployed position before re-engaging the motor, tuned via SmartDashboard.doubleReturns the deployed arm position, tuned via SmartDashboard.doubleReturns the horizontal offset angle in radians.doubleReturns the stowed arm position, tuned via SmartDashboard.doubleReturns the sweep arm position, tuned via SmartDashboard.Methods inherited from class frc.robot.shared.config.AbstractSetAndSeekSubsystemConfig
getMaximumSetpointDegrees, getMaximumSetpointRadians, getMinimumSetpointDegrees, getMinimumSetpointRadiansMethods inherited from class frc.robot.shared.config.AbstractSubsystemConfig
getVerboseMethods inherited from class frc.robot.shared.config.AbstractConfig
getDashboardPrefix, initializeNestedDashboardPrefixes, readTunableBoolean, readTunableDegrees, readTunableDegreesAsRadians, readTunableNumber, readTunableString, setDashboardPrefix
-
Field Details
-
stowedPositionDegrees
public double stowedPositionDegreesArm angle when stowed upright inside the robot perimeter, in degrees. This is the match-start and default position. -
deployedPositionDegrees
public double deployedPositionDegreesArm angle when deployed downward outside the robot perimeter to collect Fuel, in degrees. -
sweepPositionDegrees
public double sweepPositionDegreesArm angle raised to push Fuel from the back of the hopper toward the shooting array, in degrees. -
horizontalOffsetDegrees
public double horizontalOffsetDegreesAngle offset from the encoder's zero position to the arm's horizontal reference, in degrees.WPILib's
ArmFeedforwardexpects 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 deployedHoldToleranceDegreesMaximum 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
-