Package frc.robot.subsystems
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 -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the current measured climber height.edu.wpi.first.wpilibj2.command.CommandGenerates an autonomous, state-machine style verification routine for this subsystem.voidperiodic()voidsetTargetPosition(double positionMeters) Commands the climber to a target height using Motion Magic with dynamic feedforward.voidsetVoltage(double volts) edu.wpi.first.wpilibj2.command.CommandsysIdDynamic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction) edu.wpi.first.wpilibj2.command.CommandsysIdQuasistatic(edu.wpi.first.wpilibj2.command.sysid.SysIdRoutine.Direction direction) 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
-
MARSClimber
-
-
Method Details
-
periodic
public void periodic()- Specified by:
periodicin interfaceedu.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:SystemTestableGenerates an autonomous, state-machine style verification routine for this subsystem.- Specified by:
getSystemCheckCommandin interfaceSystemTestable- Returns:
- A command that runs through diagnostic checks and logs results.
-