Package tagalong.commands.base
Class ElevateToCmd<T extends TagalongSubsystemBase & ElevatorAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.ElevateToCmd<T>
- All Implemented Interfaces:
Sendable
public class ElevateToCmd<T extends TagalongSubsystemBase & ElevatorAugment>
extends TagalongCommand
Base Command for linear system movement, moves system to specified height.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionElevateToCmd
(int id, T elevator, double goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPositionM) Constructor that creates the command with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPositionM, boolean holdPositionAfter) Constructor that creates the command with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.ElevateToCmd
(int id, T elevator, Height goalPosition, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, double goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, with the below parameters.ElevateToCmd
(T elevator, Height goalPositionM) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, Height goalPositionM, boolean holdPositionAfter) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.ElevateToCmd
(T elevator, Height goalPosition, 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
-
ElevateToCmd
Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in meters
-
ElevateToCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in meters
-
ElevateToCmd
Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completes
-
ElevateToCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completes
-
ElevateToCmd
public ElevateToCmd(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can move
-
ElevateToCmd
public ElevateToCmd(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS) Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can move
-
ElevateToCmd
public ElevateToCmd(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movetoleranceM
- the desired tolerance for height, in meters
-
ElevateToCmd
public ElevateToCmd(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- maximum velocity, in meters per second, the elevator can movetoleranceM
- the desired tolerance for height, in meters
-
ElevateToCmd
public ElevateToCmd(T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-
ElevateToCmd
public ElevateToCmd(int id, T elevator, Height goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in metersholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-
ElevateToCmd
public ElevateToCmd(T elevator, Height goalPosition, 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 microsystemgoalPosition
- The target height for the elevatorholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-
ElevateToCmd
public ElevateToCmd(int id, T elevator, Height goalPosition, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPosition
- The target height for the elevatorholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-
ElevateToCmd
public ElevateToCmd(T elevator, double goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, with the below parameters. Allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in meters, as a doubleholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-
ElevateToCmd
public ElevateToCmd(int id, T elevator, double goalPositionM, boolean holdPositionAfter, double maxVelocityMPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, with the below parameters. Allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalPositionM
- The target height for the elevator, in meters, as a double.holdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- 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
-