Package com.thunder.lib.commands
Class ThunderAutoTrajectoryCommand
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
com.thunder.lib.commands.ThunderAutoTrajectoryCommand
- All Implemented Interfaces:
Sendable
A command that follows a ThunderAuto Trajectory using the specified
ThunderTrajectoryRunnerProperties.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior -
Constructor Summary
ConstructorsConstructorDescriptionThunderAutoTrajectoryCommand(String trajectoryName, ThunderAutoProject project, ThunderTrajectoryRunnerProperties properties) Constructs a ThunderAutoTrajectoryCommand. -
Method Summary
Methods inherited from class edu.wpi.first.wpilibj2.command.Command
addRequirements, addRequirements, alongWith, andThen, andThen, asProxy, beforeStarting, beforeStarting, cancel, deadlineFor, deadlineWith, finallyDo, finallyDo, getInterruptionBehavior, getName, getRequirements, getSubsystem, handleInterrupt, hasRequirement, ignoringDisable, initSendable, isScheduled, onlyIf, onlyWhile, raceWith, repeatedly, runsWhenDisabled, schedule, setName, setSubsystem, unless, until, withDeadline, withInterruptBehavior, withName, withTimeout, withTimeout
-
Constructor Details
-
ThunderAutoTrajectoryCommand
public ThunderAutoTrajectoryCommand(String trajectoryName, ThunderAutoProject project, ThunderTrajectoryRunnerProperties properties) Constructs a ThunderAutoTrajectoryCommand.- Parameters:
trajectoryName- The name of the trajectory to follow.project- The ThunderAutoProject that contains the trajectory and any referenced actions.properties- The ThunderTrajectoryRunnerProperties to use for following the trajectory.
-
-
Method Details
-
isValid
public boolean isValid()Checks if the command has a valid trajectory to follow.- Returns:
- True or false.
-
initialize
public void initialize()- Overrides:
initializein classCommand
-
execute
public void execute() -
end
public void end(boolean interrupted) -
isFinished
public boolean isFinished()- Overrides:
isFinishedin classCommand
-