Class Arm

All Implemented Interfaces:
Sendable, Subsystem, Monitored

public class Arm extends SubsystemBase implements Monitored
Subsystem for controlling the robot's intake mechanism.

Responsible for deploying/retracting the intake arm and controlling the rollers to pull in or push out game pieces.

  • Constructor Details

    • Arm

      public Arm(ArmIO io)
      Creates a new Arm subsystem.
      Parameters:
      io - The abstraction layer for the arm hardware.
  • Method Details

    • setGoal

      public void setGoal(Arm.Goal goal)
      Sets the high-level goal for the intake arm.
      Parameters:
      goal - The target goal for the arm.
    • periodic

      public void periodic()
      Updates hardware inputs, logs data, and updates status alerts.
      Specified by:
      periodic in interface Subsystem
    • isDeployed

      public Trigger isDeployed()
      Returns a trigger that is true when the arm is in the deployed position.
      Returns:
      The deployed trigger.
    • isRetracted

      public Trigger isRetracted()
      Returns a trigger that is true when the arm is in the retracted position.
      Returns:
      The retracted trigger.
    • deploy

      public Command deploy()
      Returns a command to move the arm to the deployed position.
      Returns:
      The deploy command.
    • retract

      public Command retract()
      Returns a command to move the arm to the retracted position.
      Returns:
      The retract command.
    • setRetract

      public void setRetract()
      Convenience method to set the retract goal directly.
    • setDeploy

      public void setDeploy()
      Convenience method to set the deploy goal directly.
    • isHealthy

      public boolean isHealthy()
      Returns whether or not the subsystem is healthy
      Specified by:
      isHealthy in interface Monitored
      Returns:
      True if the subsystem is healthy, false otherwise.
    • clearFaults

      public void clearFaults()
      Clears all faults and warnings.
      Specified by:
      clearFaults in interface Monitored