Package tagalong.commands.base
Class PivotToCmd<T extends TagalongSubsystemBase & PivotAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.PivotToCmd<T>
- All Implemented Interfaces:
Sendable
Command that moves the pivot absolutely to the desired position
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionPivotToCmd
(int id, T pivot, double goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactPivotToCmd
(int id, T pivot, Angle goalPosition) Constructor with default to hold position afterPivotToCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter) Constructor that creates the command with the below parameters.PivotToCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.PivotToCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.PivotToCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor that creates the command with the below parameters.PivotToCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.PivotToCmd
(T pivot, double goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactPivotToCmd
(T pivot, Angle goalPosition) Constructor with default to hold position afterPivotToCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter) Constructor that creates the command with the below parameters.PivotToCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.PivotToCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.PivotToCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor that creates the command with the below parameters.PivotToCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, 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
-
PivotToCmd
Constructor with default to hold position after- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot position
-
PivotToCmd
Constructor with default to hold position after- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positon
-
PivotToCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completes
-
PivotToCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completes
-
PivotToCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this command
-
PivotToCmd
public PivotToCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this command
-
PivotToCmd
public PivotToCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandtoleranceRot
- The number of rotations short of or beyond the target position the pivot can be while still being considered in tolerance
-
PivotToCmd
public PivotToCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandtoleranceRot
- The number of rotations short of or beyond the target position the pivot can be while still being considered in tolerance
-
PivotToCmd
public PivotToCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandlowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in toleranceupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
-
PivotToCmd
public PivotToCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandlowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in toleranceupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
-
PivotToCmd
public PivotToCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerancelowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in tolerancerequiredInToleranceDurationS
- The number of seconds that being in tolerance is required for
-
PivotToCmd
public PivotToCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandlowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in toleranceupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerancerequiredInToleranceDurationS
- The number of seconds that being in tolerance is required for
-
PivotToCmd
public PivotToCmd(T pivot, double goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandlowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in toleranceupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerancerequiredInToleranceDurationS
- The number of seconds that being in tolerance is required for
-
PivotToCmd
public PivotToCmd(int id, T pivot, double goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interact- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- Goal pivot positonholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this commandlowerToleranceRot
- The number of rotations short of the target position the pivot can be while still being considered in toleranceupperToleranceRot
- The number of rotations beyond the target position the pivot can be while still being considered in tolerancerequiredInToleranceDurationS
- The number of seconds that being in tolerance is required for
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-