Class MARSClimber

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

public class MARSClimber extends edu.wpi.first.wpilibj2.command.SubsystemBase implements SystemTestable
Subsystem representing the robot's fast climber mechanism.

Handles physics simulation, linear position tracking, and dynamic load shedding to prevent battery brownouts using MARSPowerManager data.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the current measured climber height.
    edu.wpi.first.wpilibj2.command.Command
    Generates an autonomous, state-machine style verification routine for this subsystem.
    void
     
    void
    setTargetPosition(double positionMeters)
    Commands the climber to a target height using Motion Magic with dynamic feedforward.
    void
    setVoltage(double volts)
     
    edu.wpi.first.wpilibj2.command.Command
    sysIdDynamic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction)
     
    edu.wpi.first.wpilibj2.command.Command
    sysIdQuasistatic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction)
     

    Methods inherited from class edu.wpi.first.wpilibj2.command.SubsystemBase

    addChild, getName, getSubsystem, initSendable, setName, setSubsystem

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface edu.wpi.first.wpilibj2.command.Subsystem

    defer, getCurrentCommand, getDefaultCommand, idle, register, removeDefaultCommand, run, runEnd, runOnce, setDefaultCommand, simulationPeriodic, startEnd, startRun
  • Constructor Details

  • Method Details

    • periodic

      public void periodic()
      Specified by:
      periodic in interface edu.wpi.first.wpilibj2.command.Subsystem
    • setVoltage

      public void setVoltage(double volts)
    • setTargetPosition

      public void setTargetPosition(double positionMeters)
      Commands the climber to a target height using Motion Magic with dynamic feedforward.
      Parameters:
      positionMeters - Target elevator height in meters.
    • getPositionMeters

      public double getPositionMeters()
      Returns the current measured climber height.
      Returns:
      Current position in meters.
    • sysIdQuasistatic

      public edu.wpi.first.wpilibj2.command.Command sysIdQuasistatic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction)
    • sysIdDynamic

      public edu.wpi.first.wpilibj2.command.Command sysIdDynamic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction)
    • getSystemCheckCommand

      public edu.wpi.first.wpilibj2.command.Command getSystemCheckCommand()
      Description copied from interface: SystemTestable
      Generates an autonomous, state-machine style verification routine for this subsystem.
      Specified by:
      getSystemCheckCommand in interface SystemTestable
      Returns:
      A command that runs through diagnostic checks and logs results.