Package tagalong.commands.base
Class RollXCmd<T extends TagalongSubsystemBase & RollerAugment>
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
tagalong.commands.TagalongCommand
tagalong.commands.base.RollXCmd<T>
- All Implemented Interfaces:
Sendable
Command that rotates roller 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
ConstructorsConstructorDescriptionRollXCmd
(int id, T roller, 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.RollXCmd
(int id, T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.RollXCmd
(int id, T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.RollXCmd
(int id, T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.RollXCmd
(int id, T roller, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.RollXCmd
(T roller, 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.RollXCmd
(T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.RollXCmd
(T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.RollXCmd
(T roller, 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
-
RollXCmd
Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotations
-
RollXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotations
-
RollXCmd
Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching target
-
RollXCmd
Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching target
-
RollXCmd
public RollXCmd(T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can move
-
RollXCmd
public RollXCmd(int id, T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can move
-
RollXCmd
public RollXCmd(T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movetoleranceM
- the desired tolerance for angle, in rotations
-
RollXCmd
public RollXCmd(int id, T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double toleranceM) Constructor that creates the command with the below parameters.- Parameters:
id
- Tagalong Subsystem containing a roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movetoleranceM
- the desired tolerance for angle, in rotations
-
RollXCmd
public RollXCmd(T roller, Angle relativeMovementRot, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM) Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotations
-
RollXCmd
public RollXCmd(int id, T roller, 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 roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- The target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotations
-
RollXCmd
public RollXCmd(T roller, Angle relativeMovement, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceM, double upperToleranceM, double requiredInToleranceDurationS) Constructor that creates the command with the below parameters.- Parameters:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the roller must stay in tolerance
-
RollXCmd
public RollXCmd(int id, T roller, 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 roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovement
- the target amount to moveholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the roller must stay in tolerance
-
RollXCmd
public RollXCmd(T roller, 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:
roller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- the target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the roller must stay in tolerance
-
RollXCmd
public RollXCmd(int id, T roller, 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 roller microsystemroller
- Tagalong Subsystem containing a roller microsystemrelativeMovementRot
- the target amount to move, in rotationsholdPositionAfter
- whether or not the roller must hold position after reaching targetmaxVelocityRPS
- maximum velocity, in rotations per second, the roller can movelowerToleranceM
- the lower bound for angle tolerance, in rotationsupperToleranceM
- the upper bound for angle tolerance, in rotationsrequiredInToleranceDurationS
- the duration (in seconds) the roller must stay in tolerance
-
-
Method Details
-
initialize
- Overrides:
initialize
in classCommand
-
execute
-
end
-
isFinished
- Overrides:
isFinished
in classCommand
-