Package tagalong.commands.base
Class PivotXCmd<T extends TagalongSubsystemBase & PivotAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.PivotXCmd<T>
- All Implemented Interfaces:
Sendable
Command that rotates pivot by a target angle based on specified
parameters.
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionPivotXCmd
(int id, T pivot, double relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactConstructor that creates the command with the below parameters.Constructor that creates the command with the below parameters.PivotXCmd
(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.PivotXCmd
(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.PivotXCmd
(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.PivotXCmd
(int id, T pivot, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.PivotXCmd
(T pivot, double relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Full constructor, allows for double for goal in rare cases of advance use needing a direct way to interactConstructor that creates the command with the below parameters.Constructor that creates the command with the below parameters.Constructor that creates the command with the below parameters.PivotXCmd
(T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.PivotXCmd
(T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.PivotXCmd
(T pivot, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, 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
-
PivotXCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotations
-
PivotXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotations
-
PivotXCmd
Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching target
-
PivotXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching target
-
PivotXCmd
public PivotXCmd(T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can move
-
PivotXCmd
public PivotXCmd(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can move
-
PivotXCmd
public PivotXCmd(T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movetoleranceM
- the desired tolerance for angle, in rotations
-
PivotXCmd
public PivotXCmd(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movetoleranceM
- the desired tolerance for angle, in rotations
-
PivotXCmd
public PivotXCmd(T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotations
-
PivotXCmd
public PivotXCmd(int id, T pivot, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotations
-
PivotXCmd
public PivotXCmd(T pivot, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the pivot must stay in tolerance
-
PivotXCmd
public PivotXCmd(int id, T pivot, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the pivot must stay in tolerance
-
PivotXCmd
public PivotXCmd(T pivot, double relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, 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:
pivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- the target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the pivot must stay in tolerance
-
PivotXCmd
public PivotXCmd(int id, T pivot, double relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, 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 a pivot microsystempivot
- Tagalong Subsystem containing a pivot microsystemrelativeMovementRot
- the target amount to move, in rotationsholdPositionAfter
- whether or not the pivot must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the pivot can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the pivot must stay in tolerance
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-