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 SummaryNested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.CommandCommand.InterruptionBehavior
- 
Constructor SummaryConstructorsConstructorDescriptionPivotToAbsoluteCmd(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 SummaryMethods inherited from class tagalong.commands.TagalongCommandanonymizeMethods inherited from class edu.wpi.first.wpilibj2.command.CommandaddRequirements, 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- 
PivotToAbsoluteCmdConstructor that creates the command with the below parameters.- Parameters:
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
 
- 
PivotToAbsoluteCmdConstructor that creates the command with the below parameters.- Parameters:
- id- The pivot integer ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
 
- 
PivotToAbsoluteCmdConstructor that creates the command with the below parameters.- Parameters:
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
 
- 
PivotToAbsoluteCmdConstructor that creates the command with the below parameters.- Parameters:
- id- The pivot integer ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
 
- 
PivotToAbsoluteCmdpublic 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 microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
 
- 
PivotToAbsoluteCmdpublic 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 ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
 
- 
PivotToAbsoluteCmdpublic 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 microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- toleranceRot- The number of rotations below or beyond the target position the pivot can be while still being considered in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- toleranceRot- The number of rotations below or beyond the target position the pivot can be while still being considered in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
 
- 
PivotToAbsoluteCmdpublic PivotToAbsoluteCmd(T pivot, Angle goalPosition, boolean holdPositionAfter, double maxVelocityRPS, double lowerToleranceRot, double upperToleranceRot, double requiredInToleranceDurationS) Full constructor- Parameters:
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- requiredInToleranceDurationS- the duration (in seconds) the pivot must stay in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPosition- The goal position to reach
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
- requiredInToleranceDurationS- the duration (in seconds) the pivot must stay in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 microsystem
- goalPositionRot- The goal position to reach, in rotations
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
- requiredInToleranceDurationS- the duration (in seconds) the pivot must stay in tolerance
 
- 
PivotToAbsoluteCmdpublic 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 ID
- pivot- Tagalong Subsystem containing a pivot microsystem
- goalPositionRot- The goal position to reach, in rotations
- holdPositionAfter- If the pivot should hold position when the command completes
- maxVelocityRPS- The maximum velocity of the pivot, in rotations per second, during this command
- lowerToleranceRot- The number of rotations below the target position the pivot can be while still being considered in tolerance
- upperToleranceRot- The number of rotations beyond the target position the pivot can be while still being considered in tolerance
- requiredInToleranceDurationS- the duration (in seconds) the pivot must stay in tolerance
 
 
- 
- 
Method Details- 
initialize- Overrides:
- initializein class- Command
 
- 
execute
- 
end
- 
isFinished- Overrides:
- isFinishedin class- Command
 
 
-