Class AutoCommands

java.lang.Object
frc.robot.commands.AutoCommands

public class AutoCommands extends Object
Container for autonomous command sequences used during the autonomous period. This class provides factory methods that create and return command sequences for different autonomous routines. Each method constructs a complete autonomous strategy that can be selected and run during the autonomous phase.
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.wpi.first.wpilibj2.command.Command
    Autonomous routine that starts from the left spawn position, delivers coral to a reef location, acquires more coral from the left intake station, and delivers it to another reef location.
    static edu.wpi.first.wpilibj2.command.Command
    Autonomous routine that starts from the right spawn position, delivers coral to a reef location, acquires more coral from the right intake station, and delivers it to another reef location.
    static edu.wpi.first.wpilibj2.command.Command
    Creates a simple test command that drives the robot backward at a fixed speed for a set time.
    static edu.wpi.first.wpilibj2.command.Command
    Creates a command that follows the PathPlanner path "Victory Lap".

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • simpleBackwardDrive

      public static edu.wpi.first.wpilibj2.command.Command simpleBackwardDrive()
      Creates a simple test command that drives the robot backward at a fixed speed for a set time. Useful for testing basic autonomous movement and verifying drivetrain functionality.
      Returns:
      A command that drives backward at 1.0 m/s for 3 seconds and then stops
    • leftToReef

      public static edu.wpi.first.wpilibj2.command.Command leftToReef()
      Autonomous routine that starts from the left spawn position, delivers coral to a reef location, acquires more coral from the left intake station, and delivers it to another reef location.

      The sequence: 1. Drives to first reef position while positioning arms 2. Drops coral at first position (i) 3. Drives to intake station to collect new coral 4. Delivers collected coral to second reef position (j)

      Returns:
      A command sequence for the complete left-side autonomous routine
    • rightToReef

      public static edu.wpi.first.wpilibj2.command.Command rightToReef()
      Autonomous routine that starts from the right spawn position, delivers coral to a reef location, acquires more coral from the right intake station, and delivers it to another reef location.

      The sequence: 1. Drives to first reef position while positioning arms 2. Drops coral at first position (f) 3. Drives to intake station to collect new coral 4. Delivers collected coral to second reef position (e)

      Returns:
      A command sequence for the complete right-side autonomous routine
    • victoryLap

      public static edu.wpi.first.wpilibj2.command.Command victoryLap()
      Creates a command that follows the PathPlanner path "Victory Lap". This autonomous routine makes the robot drive in a predetermined path around the field.
      Returns:
      A command that follows the Victory Lap path, or a simple backup command if the path cannot be loaded