Package tagalong.commands.base
Class ElevateXCmd<T extends TagalongSubsystemBase & ElevatorAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.ElevateXCmd<T>
- All Implemented Interfaces:
Sendable
Command that raises elevator by a target height based on specified
parameters.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionElevateXCmd
(int id, T elevator, double relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactElevateXCmd
(int id, T elevator, Height relativeMovementM) Constructor that creates the command with the below parameters.ElevateXCmd
(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter) Constructor that creates the command with the below parameters.ElevateXCmd
(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.ElevateXCmd
(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.ElevateXCmd
(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.ElevateXCmd
(int id, T elevator, Height relativeMovement, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, double relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactElevateXCmd
(T elevator, Height relativeMovementM) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, Height relativeMovementM, boolean holdPositionAfter) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.ElevateXCmd
(T elevator, Height relativeMovement, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters. -
Method Summary
Methods inherited from class tagalong.commands.TagalongCommand
anonymize
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
-
ElevateXCmd
Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in meters
-
ElevateXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in meters
-
ElevateXCmd
Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching target
-
ElevateXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching target
-
ElevateXCmd
public ElevateXCmd(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can move
-
ElevateXCmd
public ElevateXCmd(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can move
-
ElevateXCmd
public ElevateXCmd(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movetoleranceM
- the desired tolerance for height, in meters
-
ElevateXCmd
public ElevateXCmd(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movetoleranceM
- the desired tolerance for height, in meters
-
ElevateXCmd
public ElevateXCmd(T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in meters
-
ElevateXCmd
public ElevateXCmd(int id, T elevator, Height relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in meters
-
ElevateXCmd
public ElevateXCmd(T elevator, Height relativeMovement, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in metersrequiredInToleranceDurationS
- the duration (in seconds) the elevator must stay in tolerance
-
ElevateXCmd
public ElevateXCmd(int id, T elevator, Height relativeMovement, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in metersrequiredInToleranceDurationS
- the duration (in seconds) the elevator must stay in tolerance
-
ElevateXCmd
public ElevateXCmd(T elevator, double relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in metersrequiredInToleranceDurationS
- the duration (in seconds) the elevator must stay in tolerance
-
ElevateXCmd
public ElevateXCmd(int id, T elevator, double relativeMovementM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
id
- Tagalong Subsystem containing an elevator microsystemelevator
- Tagalong Subsystem containing an elevator microsystemrelativeMovementM
- the target amount to move, in metersholdPositionAfter
- whether or not the elevator must hold position after reaching targetmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movelowerToleranceM
- the lower bound for height tolerance, in metersupperToleranceM
- the upper bound for height tolerance, in metersrequiredInToleranceDurationS
- the duration (in seconds) the elevator must stay in tolerance
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-