Package frc.robot.subsystems
Class Auto
java.lang.Object
frc.robot.subsystems.Auto
Subsystem for the robot's autonomous functionality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CommandgetAutonomousCommand(String pathName) Get the path follower with events.static voidsetupPathPlanner(CommandSwerveDrivetrain commandSwerveDrivetrain, DriverStation.Alliance alliance) Setup AutoBuilder for PathPlanner.static voidsetupPathPlannerFailsafe(CommandSwerveDrivetrain commandSwerveDrivetrain) Configures AutoBuilder if it hasn't already been configured.
-
Constructor Details
-
Auto
public Auto()
-
-
Method Details
-
setupPathPlanner
public static void setupPathPlanner(CommandSwerveDrivetrain commandSwerveDrivetrain, DriverStation.Alliance alliance) Setup AutoBuilder for PathPlanner. -
setupPathPlannerFailsafe
Configures AutoBuilder if it hasn't already been configured. This should be run on enable so things like pathfinding commands don't cause the code to crash.- Parameters:
commandSwerveDrivetrain- The Drivetrain for PathPlanner to control.
-
getAutonomousCommand
Get the path follower with events.- Parameters:
pathName- PathPlanner path name.- Returns:
AutoBuilder.followPath(PathPlannerPath)path command.
-