Package frc.robot.subsystems.intake
Class IntakeSubsystem
java.lang.Object
edu.wpi.first.wpilibj2.command.SubsystemBase
frc.robot.shared.subsystems.AbstractSubsystem<TConfig>
frc.robot.shared.subsystems.AbstractMotorSubsystem<TConfig>
frc.robot.shared.subsystems.AbstractVelocitySubsystem<IntakeSubsystemConfig>
frc.robot.subsystems.intake.IntakeSubsystem
- All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable,edu.wpi.first.wpilibj2.command.Subsystem
Intake subsystem that spins rollers to pull Fuel from the field into the feeder.
The intake is the first mechanism a game piece touches after leaving the field. Its rollers spin forward (positive RPM) to grab Fuel off the carpet and push it into the feeder, or reverse (negative RPM) to eject unwanted pieces back onto the field.
All RPM values in the public API represent roller (mechanism) speed after gear reduction, not motor shaft speed. The subsystem extends
AbstractVelocitySubsystem which provides bidirectional velocity control with feedforward and PID.
-
Nested Class Summary
Nested classes/interfaces inherited from class frc.robot.shared.subsystems.AbstractVelocitySubsystem
AbstractVelocitySubsystem.TriFunction<A,B, C, R> -
Field Summary
Fields inherited from class frc.robot.shared.subsystems.AbstractVelocitySubsystem
controllerFields inherited from class frc.robot.shared.subsystems.AbstractMotorSubsystem
feedforward, motor, motorInputs -
Constructor Summary
ConstructorsConstructorDescriptionIntakeSubsystem(IntakeSubsystemConfig config) Builds the intake subsystem with a single motor-driven roller. -
Method Summary
Modifier and TypeMethodDescriptionvoidConvenience method that sets the rollers to the configured forward intake velocity.voidConvenience method that sets the rollers to reverse at the configured eject velocity.Methods inherited from class frc.robot.shared.subsystems.AbstractVelocitySubsystem
buildVelocityMotor, getIdleVelocityRpm, getMeasuredVelocityRpm, getTargetVelocityRpm, isAtTargetVelocity, isReady, isWithinTolerance, periodic, seekVelocity, setTargetVelocityRpm, stopMethods inherited from class frc.robot.shared.subsystems.AbstractMotorSubsystem
applyVoltage, getMeasuredPositionRadians, getMeasuredVelocityRadiansPerSecond, getSysIdRoutine, logSysIdEnd, logSysIdInterrupted, logSysIdStart, refreshFeedforward, updateAndLogMotorInputsMethods inherited from class frc.robot.shared.subsystems.AbstractSubsystem
getConfig, isFMSAttached, isSimulation, isSubsystemDisabled, isVerbose, isVerboseLoggingEnabled, logDisabled, reportWarningMethods 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
-
IntakeSubsystem
Builds the intake subsystem with a single motor-driven roller.- Parameters:
config- intake configuration bundle loaded from JSON; velocities are expressed in RPM
-
-
Method Details
-
setForwardVelocity
public void setForwardVelocity()Convenience method that sets the rollers to the configured forward intake velocity.Use this to pull Fuel from the field into the feeder.
-
setReverseVelocity
public void setReverseVelocity()Convenience method that sets the rollers to reverse at the configured eject velocity.The configured reverse RPM is stored as a positive value; this method negates it so the rollers spin backward to push Fuel out.
-