Package frc.robot.auton
Class Auton
java.lang.Object
frc.robot.auton.Auton
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTriggerstatic final com.pathplanner.lib.events.EventTrigger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexit()static edu.wpi.first.wpilibj2.command.CommandfollowSinglePath(String pathName) edu.wpi.first.wpilibj2.command.CommandRetrieves the autonomous command selected on the shuffleboard.voidinit()protected static edu.wpi.first.wpilibj2.command.Commandlog(edu.wpi.first.wpilibj2.command.Command cmd) static edu.wpi.first.wpilibj2.command.CommandpathfindingCommandToPose(double xPos, double yPos, double rotation, double vel, double accel) voidCalled at AutonExit and displays the duration of the auton command Based on 6328 codevoidThis method configures the available autonomous routines that can be selected from the SmartDashboard.edu.wpi.first.wpilibj2.command.CommandSpectrumAuton(String autoName, boolean mirrored) Creates a SpectrumAuton command sequence.edu.wpi.first.wpilibj2.command.CommandSpectrumAuton(String autoName, boolean mirrored, double duration) voidThis method is called in AutonInit
-
Field Details
-
autonDepotIntake
public static final com.pathplanner.lib.events.EventTrigger autonDepotIntake -
autonOutpostIntake
public static final com.pathplanner.lib.events.EventTrigger autonOutpostIntake -
autonNeutralIntake
public static final com.pathplanner.lib.events.EventTrigger autonNeutralIntake -
autonShoot
public static final com.pathplanner.lib.events.EventTrigger autonShoot -
autonScore
public static final com.pathplanner.lib.events.EventTrigger autonScore -
autonClearStates
public static final com.pathplanner.lib.events.EventTrigger autonClearStates -
autonHome
public static final com.pathplanner.lib.events.EventTrigger autonHome -
autonLeft
public static final com.pathplanner.lib.events.EventTrigger autonLeft -
autonRight
public static final com.pathplanner.lib.events.EventTrigger autonRight
-
-
Constructor Details
-
Auton
public Auton()
-
-
Method Details
-
setupSelectors
public void setupSelectors()This method configures the available autonomous routines that can be selected from the SmartDashboard. -
init
public void init() -
exit
public void exit() -
SpectrumAuton
Creates a SpectrumAuton command sequence.This method generates a command sequence that first waits for 0.01 seconds and then executes a PathPlannerAuto command with the specified autonomous routine name.
- Parameters:
autoName- the name of the autonomous routine to executemirrored- whether the autonomous routine should be mirrored- Returns:
- a Command that represents the SpectrumAuton sequence
-
SpectrumAuton
public edu.wpi.first.wpilibj2.command.Command SpectrumAuton(String autoName, boolean mirrored, double duration) -
getAutonomousCommand
public edu.wpi.first.wpilibj2.command.Command getAutonomousCommand()Retrieves the autonomous command selected on the shuffleboard.- Returns:
- the selected autonomous command if one is chosen; otherwise, returns a PrintCommand indicating that the autonomous command is null.
-
startAutonTimer
public void startAutonTimer()This method is called in AutonInit -
printAutoDuration
public void printAutoDuration()Called at AutonExit and displays the duration of the auton command Based on 6328 code -
followSinglePath
-
pathfindingCommandToPose
public static edu.wpi.first.wpilibj2.command.Command pathfindingCommandToPose(double xPos, double yPos, double rotation, double vel, double accel) -
log
protected static edu.wpi.first.wpilibj2.command.Command log(edu.wpi.first.wpilibj2.command.Command cmd)
-