Package frc.robot.commands
Class MoveToPos
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.MoveToPos
- All Implemented Interfaces:
Sendable
Move to Position
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
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
-
Field Details
-
swerve
-
pose2d
-
pose2dSupplier
-
-
Constructor Details
-
MoveToPos
Move to Position- Parameters:
swerve
- Swerve Drive Subsystempose2dSupplier
- Supplier of Pose2dflipForRed
- Flip the Pose2d relative to the Red Alliance
-
MoveToPos
public MoveToPos(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed, double tol, double turnP) Move to Position- Parameters:
swerve
- Swerve Drive Subsystempose2dSupplier
- Supplier of Pose2dflipForRed
- Flip the Pose2d relative to the Red Alliance
-
MoveToPos
Move to Position- Parameters:
swerve
- Swerve Drive Subsystempose2dSupplier
- Supplier of Pose2dflipForRed
- Flip the Pose2d relative to the Red Alliance
-
MoveToPos
Move to Position- Parameters:
swerve
- Swerve Drive Subsystempose2dSupplier
- Supplier of Pose2d
-
MoveToPos
Move to Position- Parameters:
swerve
- Swerve Drive Subsystem
-
-
Method Details
-
initialize
public void initialize()- Overrides:
initialize
in classCommand
-
execute
public void execute() -
end
public void end(boolean interrupted) -
isFinished
public boolean isFinished()- Overrides:
isFinished
in classCommand
-