Package tagalong.commands.base
Class PivotToAbsoluteCmd<T extends TagalongSubsystemBase & PivotAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.PivotToAbsoluteCmd<T>
- All Implemented Interfaces:
Sendable
public class PivotToAbsoluteCmd<T extends TagalongSubsystemBase & PivotAugment>
extends TagalongCommand
PivotToCommand with optimal pathing
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionPivotToAbsoluteCmd
(int id, T pivot, double goalPositionRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal position (rotations) in rare cases of advance use needing a direct way to interactPivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor with ID for specifying pivot but no in tolerance duration requirementPivotToAbsoluteCmd
(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor with ID for specifying pivotPivotToAbsoluteCmd
(T pivot, double goalPositionRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal position (rotations) in rare cases of advance use needing a direct way to interactPivotToAbsoluteCmd
(T pivot, Angle goalPosition) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double toleranceRot) Constructor that creates the command with the below parameters.PivotToAbsoluteCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor with no in tolerance duration requirementPivotToAbsoluteCmd
(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor -
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
-
PivotToAbsoluteCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reach
-
PivotToAbsoluteCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reach
-
PivotToAbsoluteCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- If the pivot should hold position when the command completes
-
PivotToAbsoluteCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- If the pivot should hold position when the command completes
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this command
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(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
- The goal position to reachholdPositionAfter
- If the pivot should hold position when the command completesmaxVelocityRPS
- The maximum velocity of the pivot, in rotations per second, during this command
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(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
- The goal position to reachholdPositionAfter
- 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 below or beyond the target position the pivot can be while still being considered in tolerance
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(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
- The goal position to reachholdPositionAfter
- 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 below or beyond the target position the pivot can be while still being considered in tolerance
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor with no in tolerance duration requirement- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- 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 below 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
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot) Constructor with ID for specifying pivot but no in tolerance duration requirement- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- 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 below 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
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- 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 below the target position the pivot can be while still being considered in tolerancerequiredInToleranceDurationS
- the duration (in seconds) the pivot must stay in tolerance
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(int id, T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor with ID for specifying pivot- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPosition
- The goal position to reachholdPositionAfter
- 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 below 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 duration (in seconds) the pivot must stay in tolerance
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(T pivot, double goalPositionRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal position (rotations) in rare cases of advance use needing a direct way to interact- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemgoalPositionRot
- The goal position to reach, in rotationsholdPositionAfter
- 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 below 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 duration (in seconds) the pivot must stay in tolerance
-
PivotToAbsoluteCmd
public PivotToAbsoluteCmd(int id, T pivot, double goalPositionRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor, allows for double for goal position (rotations) in rare cases of advance use needing a direct way to interact- Parameters:
id
- The pivot integer IDpivot
- Tagalong Subsystem containing a pivot microsystemgoalPositionRot
- The goal position to reach, in rotationsholdPositionAfter
- 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 below 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 duration (in seconds) the pivot must stay in tolerance
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-