Class Climb

All Implemented Interfaces:
Sendable, Subsystem, Monitored

public class Climb extends SubsystemBase implements Monitored
Subsystem for the robot's climb mechanism.

Handles controlling the lift motor voltage and monitoring limit switches to prevent over-extension or damage to the mechanism.

  • Constructor Details

    • Climb

      public Climb(ClimbIO io)
      Creates a new Climb subsystem.
      Parameters:
      io - The abstraction layer for the climb hardware.
  • Method Details

    • setGoal

      public void setGoal(Climb.Goal goal)
      Sets the current requested goal for the climber.
      Parameters:
      goal - The target goal for the climber.
    • periodic

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

      public Trigger isUp()
      Returns a trigger that is true when the upper limit switch is triggered.
      Returns:
      The upper limit trigger.
    • isDown

      public Trigger isDown()
      Returns a trigger that is true when the lower limit switch is triggered.
      Returns:
      The lower limit trigger.
    • raise

      public Command raise()
      Returns a command to raise the climber until it hits the upper limit.
      Returns:
      The raise command.
    • lower

      public Command lower()
      Returns a command to lower the climber until it hits the lower limit.
      Returns:
      The lower command.
    • stop

      public Command stop()
      Returns a command to stop the climber.
      Returns:
      The stop command.
    • 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