Package frc.robot.subsystems.intake.arm
Class Arm
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.intake.arm.Arm
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all faults and warnings.deploy()Returns a command to move the arm to the deployed position.Returns a trigger that is true when the arm is in the deployed position.booleanReturns whether or not the subsystem is healthyReturns a trigger that is true when the arm is in the retracted position.voidperiodic()Updates hardware inputs, logs data, and updates status alerts.retract()Returns a command to move the arm to the retracted position.voidConvenience method to set the deploy goal directly.voidSets the high-level goal for the intake arm.voidConvenience method to set the retract goal directly.Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase
addChild, getName, getSubsystem, initSendable, setName, setSubsystemMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem
defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
-
Constructor Details
-
Arm
Creates a new Arm subsystem.- Parameters:
io- The abstraction layer for the arm hardware.
-
-
Method Details
-
setGoal
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. -
isDeployed
Returns a trigger that is true when the arm is in the deployed position.- Returns:
- The deployed trigger.
-
isRetracted
Returns a trigger that is true when the arm is in the retracted position.- Returns:
- The retracted trigger.
-
deploy
Returns a command to move the arm to the deployed position.- Returns:
- The deploy 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 -
clearFaults
public void clearFaults()Clears all faults and warnings.- Specified by:
clearFaultsin interfaceMonitored
-