Class Arm

java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.Arm
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, edu.wpi.first.wpilibj2.command.Subsystem

public class Arm extends edu.wpi.first.wpilibj2.command.SubsystemBase
  • Constructor Details

    • Arm

      public Arm()
      Creates a new Arm.
  • Method Details

    • setArmTarget

      public void setArmTarget(double targetDegrees)
      safely set the target angle for the arm
      Parameters:
      targetDegrees - the target angle for the arm in degrees
    • setArmTargetByDistanceExtended

      public void setArmTargetByDistanceExtended(double distance)
      sets the arm target based on the distance to the speaker and the interpolation table
      Parameters:
      distance - the distance to the speaker in meters
    • setArmTargetByDistanceRetracted

      public void setArmTargetByDistanceRetracted(double distance)
    • RaiseElevator

      public edu.wpi.first.wpilibj2.command.Command RaiseElevator()
    • lowerElevator

      public edu.wpi.first.wpilibj2.command.Command lowerElevator()
    • Stow

      public edu.wpi.first.wpilibj2.command.Command Stow()
      stows the arm and elevator
      Returns:
      a command to stow the arm and elevator
    • setArmVelocity

      public void setArmVelocity(double velocityDegreesPerSec)
      sets the velocity for the arm by moving a position setpoint
      Parameters:
      velocityDegreesPerSec - the velocity for the arm in degrees per second
    • setElevatorTarget

      public void setElevatorTarget(double target)
      safely set the target height for the elevator
      Parameters:
      target - the target height for the elevator in inches
    • SetTargets

      public edu.wpi.first.wpilibj2.command.Command SetTargets(Constants.ShootingConstants.ShootingPosition position)
    • SetTargets

      public edu.wpi.first.wpilibj2.command.Command SetTargets(Supplier<Double> distance)
    • SetTargetsAuto

      public edu.wpi.first.wpilibj2.command.Command SetTargetsAuto(Supplier<Double> distance)
    • setElevatorVelocity

      public void setElevatorVelocity(double velocityDegreesPerSec)
      sets the velocity for the elevator by moving a position setpoint
      Parameters:
      velocityDegreesPerSec - the velocity for the elevator in degrees per second
    • ArmDefaultCommand

      public edu.wpi.first.wpilibj2.command.Command ArmDefaultCommand(Supplier<Double> armVelocity, Supplier<Double> elevatorVelocity)
    • ToggleBrakeModes

      public edu.wpi.first.wpilibj2.command.Command ToggleBrakeModes()
    • EnableBrakeMode

      public edu.wpi.first.wpilibj2.command.Command EnableBrakeMode()
    • periodic

      public void periodic()
    • getArmAbsoluteEncoderPosition

      public double getArmAbsoluteEncoderPosition()
    • getElevatorAbsoluteEncoderPosition

      public double getElevatorAbsoluteEncoderPosition()
    • getMotorTab

      public MotorTab getMotorTab()
    • areArmAndElevatorAtTarget

      public boolean areArmAndElevatorAtTarget()