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 Command
getAutonomousCommand
(String pathName) Get the path follower with events.static void
setupPathPlanner
(Drivetrain drivetrain, DriverStation.Alliance alliance) Setup AutoBuilder for PathPlanner.static void
setupPathPlannerFailsafe
(Drivetrain drivetrain) Configures AutoBuilder if it hasn't already been configured.
-
Constructor Details
-
Auto
public Auto()
-
-
Method Details
-
setupPathPlanner
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:
drivetrain
- The Drivetrain for PathPlanner to control.
-
getAutonomousCommand
Get the path follower with events.- Parameters:
pathName
- PathPlanner path name.- Returns:
AutoBuilder.followPath(PathPlannerPath)
path command.
-