Skip to main content
The intake consists of two cooperating sub-components: IntakePivot (a single TalonFX controlling a 35:1 arm) and IntakeRollers (two TalonFXs running velocity torque-current FOC). IntakeSubsystem coordinates them and exposes the high-level commands consumed by Controls.java.

IntakeMode states

IntakeSubsystem uses an internal IntakeMode enum to select behavior each loop. Controls.java writes to the static intakeMode field in response to driver button presses.
Moves the pivot to DEPLOYED_POS (-0.43 rotations) and stops the rollers. Used when the robot is ready to pick up fuel but has not yet started intaking.

Smart intake speed scaling

smartIntake(Supplier<ChassisSpeeds>) scales roller RPS linearly from chassis translational speed to reduce spilling at high drive speeds:
At rest the rollers spin at 50 RPS; at maximum drive speed the multiplier adds up to ~+30 RPS on top, keeping fuel from bouncing back out.

Public API

IntakePivot

IntakePivot drives a single TalonFX (CAN ID INTAKE_PIVOT_MOTOR_ID = 15) through a 35:1 gear reduction using MotionMagic position control with arm-cosine gravity compensation.

Key positions

MotionMagic tuning

Auto-zero sequence

The pivot zero is performed at startup by Controls.java (driver Start button while disabled). autoZeroCommand() drives the arm toward the hard stop at 8 V, waits for stator current to hit the stall limit (59 A), then calls zeroPivot() to set the encoder to 0. In simulation, autoZeroCommand() falls back to zeroPivot() immediately.

IntakeRollers

Two TalonFX motors drive the rollers via VelocityTorqueCurrentFOC: The left roller runs on the roboRIO bus (comp bot) or the alpha CANivore bus (alpha bot), while the right roller always uses the roboRIO bus. Motors run in Coast neutral mode to prevent fuel damage on sudden stops.

Controller bindings