Package tagalong.commands.base
Class ElevateToDynamicCmd<T extends TagalongSubsystemBase & ElevatorAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.ElevateToDynamicCmd<T>
- All Implemented Interfaces:
Sendable
public class ElevateToDynamicCmd<T extends TagalongSubsystemBase & ElevatorAugment>
extends TagalongCommand
Command for the elevator to continuously move towards the goal supplier's target height
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionElevateToDynamicCmd
(int id, T elevator, DoubleSupplier goalSupplierM) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS, BooleanSupplier startSupplier) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(T elevator, DoubleSupplier goalSupplierM) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS) Continuously move to the double suppliers target position.ElevateToDynamicCmd
(T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS, BooleanSupplier startSupplier) Continuously move to the double suppliers target position. -
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
-
ElevateToDynamicCmd
public ElevateToDynamicCmd(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS, BooleanSupplier startSupplier) Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- Maximum velocity for the elevator during this commandstartSupplier
- BooleanSupplier condition for movement to start, defaults to elevator::isSafeToMove
-
ElevateToDynamicCmd
public ElevateToDynamicCmd(T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS, BooleanSupplier startSupplier) Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- Maximum velocity for the elevator during this commandstartSupplier
- BooleanSupplier condition for movement to start, defaults to elevator::isSafeToMove
-
ElevateToDynamicCmd
public ElevateToDynamicCmd(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS) Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- Maximum velocity for the elevator during this command
-
ElevateToDynamicCmd
public ElevateToDynamicCmd(T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter, double maxVelocityMPS) Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completesmaxVelocityMPS
- Maximum velocity for the elevator during this command
-
ElevateToDynamicCmd
public ElevateToDynamicCmd(int id, T elevator, DoubleSupplier goalSupplierM, boolean holdPositionAfter) Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completes
-
ElevateToDynamicCmd
Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator heightholdPositionAfter
- If the elevator should hold position when the command completes command
-
ElevateToDynamicCmd
Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
id
- Integer ID of the elevator microsystem inside the Tagalong Subsystemelevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator height
-
ElevateToDynamicCmd
Continuously move to the double suppliers target position. The function is continuous, it has no end condition, so the user must interrupt the command or decorate the command with an end condition. Useful for dynamic movements that are dependent on sensor readings, field conditions, or driver configurations.- Parameters:
elevator
- Tagalong Subsystem containing an elevator microsystemgoalSupplierM
- DoubleSupplier for the elevator height
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-