Package frc.robot.subsystems
Class MARSIntakePivot
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.subsystems.MARSIntakePivot
- All Implemented Interfaces:
SystemTestable,edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
public class MARSIntakePivot
extends edu.wpi.first.wpilibj2.command.SubsystemBase
implements SystemTestable
High-level subsystem representing the intake deployment pivot.
Handles physics simulation, angular position tracking, and dynamic load shedding to prevent battery brownouts using MARSPowerManager data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleedu.wpi.first.wpilibj2.command.CommandGenerates an autonomous, state-machine style verification routine for this subsystem.edu.wpi.first.wpilibj2.command.Commandhome()edu.wpi.first.wpilibj2.command.CommandhomeWithCurrent(double homingVoltage, double currentThresholdAmps) booleanvoidperiodic()voidsetTargetPosition(double positionRads) Commands the intake pivot to a target angular position using Motion Magic with dynamic feedforward.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
-
MARSIntakePivot
-
-
Method Details
-
periodic
public void periodic()- Specified by:
periodicin interfaceedu.wpi.first.wpilibj2.command.Subsystem
-
setTargetPosition
public void setTargetPosition(double positionRads) Commands the intake pivot to a target angular position using Motion Magic with dynamic feedforward.- Parameters:
positionRads- Target angle in radians.
-
isAtTolerance
public boolean isAtTolerance() -
getPositionRads
public double getPositionRads() -
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) -
homeWithCurrent
public edu.wpi.first.wpilibj2.command.Command homeWithCurrent(double homingVoltage, double currentThresholdAmps) -
home
public edu.wpi.first.wpilibj2.command.Command home() -
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.
-