Package frc.robot.commands
Class MoveToPose
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.MoveToPose
- All Implemented Interfaces:
Sendable
Move to Pose2d
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Constructor Summary
ConstructorsConstructorDescriptionMoveToPose
(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed, double tol, double rotTol, choreo.auto.AutoRoutine autoRoutine) Move to a specified Pose2d commandMoveToPose
(Swerve swerve, Supplier<Pose2d> pose2dSupplier, DoubleSupplier maxSpeedSupplier, boolean flipForRed, double tol, double rotTol) Move to a specified Pose2d commandMoveToPose
(Swerve swerve, Supplier<Pose2d> pose2dSupplier, DoubleSupplier maxSpeedSupplier, boolean flipForRed, double tol, double rotTol, choreo.auto.AutoRoutine autoRoutine) Move to a specified Pose2d command -
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
-
Constructor Details
-
MoveToPose
public MoveToPose(Swerve swerve, Supplier<Pose2d> pose2dSupplier, DoubleSupplier maxSpeedSupplier, boolean flipForRed, double tol, double rotTol) Move to a specified Pose2d command- Parameters:
swerve
- Swerve Subsystempose2dSupplier
- Pose2d SuppliermaxSpeedSupplier
- maximum speed to move atflipForRed
- Whether to flip the pose2d for red alliancetol
- Translational TolerancerotTol
- Rotational Tolerance
-
MoveToPose
public MoveToPose(Swerve swerve, Supplier<Pose2d> pose2dSupplier, DoubleSupplier maxSpeedSupplier, boolean flipForRed, double tol, double rotTol, choreo.auto.AutoRoutine autoRoutine) Move to a specified Pose2d command- Parameters:
swerve
- Swerve Subsystempose2dSupplier
- Pose2d SuppliermaxSpeedSupplier
- maximum speed to move atflipForRed
- Whether to flip the pose2d for red alliancetol
- Translational TolerancerotTol
- Rotational ToleranceautoRoutine
- Choreo AutoRoutine to integrate command
-
MoveToPose
public MoveToPose(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed, double tol, double rotTol, choreo.auto.AutoRoutine autoRoutine) Move to a specified Pose2d command- Parameters:
swerve
- Swerve Subsystempose2dSupplier
- Pose2d SupplierflipForRed
- Whether to flip the pose2d for red alliancetol
- Translational TolerancerotTol
- Rotational ToleranceautoRoutine
- Choreo AutoRoutine to integrate command
-
-
Method Details
-
active
Returns a trigger that is true while the trajectory is scheduled.- Returns:
- A trigger that is true while the trajectory is scheduled.
-
done
-
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
-