Class AutoRoutines

java.lang.Object
frc.robot.auto.AutoRoutines

public class AutoRoutines extends Object
  • Constructor Details

    • AutoRoutines

      public AutoRoutines(DriveFSMSystem driveFSMSystem, ElevatorFSMSystem elevatorFSMSystem, FunnelFSMSystem funnelFSMSystem)
      Constructs an AutoRoutines object.
      Parameters:
      driveFSMSystem -
      elevatorFSMSystem -
      funnelFSMSystem -
  • Method Details

    • generateSequentialAutoWorkflow

      public edu.wpi.first.wpilibj2.command.Command generateSequentialAutoWorkflow(Object[] autoStageSupply, boolean throwException)
      Creates and returns a auto routine that start with a path.

      For clarification with the throwException parameter, if you set it to FALSE, it will just not add the command request into the returned SequentialCommandGroup. This could be helpful for testing series of commands when you are working with partial systems.

      If all systems are available, it should be set to TRUE - in an ideal environment, no commands should throw this issue if all systems are available. It will be more useful for debugging in this environment if you set throwException to true.
      Parameters:
      autoStageSupply - string of commands and trajectory names
      throwException - whether to throw an exception at a missing/unknown command or not.
      Returns:
      the auto routine
    • getAutoPathHandler

      public AutoPaths getAutoPathHandler()
      Get an AutoPaths instance to return all declared paths in AutoPaths.java.
      Returns:
      AutoPaths instance
    • getInitialAutoPose

      public edu.wpi.first.math.geometry.Pose2d getInitialAutoPose()
      Get the initial pose of the robot for simulation purposes.
      Returns:
      Pose2d initial pose