Package frc.robot.commands
Class MoveAndAvoidReef
java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.MoveAndAvoidReef
Move to Pose2d
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj2.command.Command
Command.InterruptionBehavior
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMoveAndAvoidReef
(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed, double tol, double rotTol, choreo.auto.AutoRoutine autoRoutine) Move to a specified Pose2d commandMoveAndAvoidReef
(Swerve swerve, Supplier<Pose2d> pose2dSupplier, DoubleSupplier maxSpeedSupplier, boolean flipForRed, double tol, double rotTol) Move to a specified Pose2d commandMoveAndAvoidReef
(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
-
Field Details
-
driveCircleRadius
public static final double driveCircleRadius
-
-
Constructor Details
-
MoveAndAvoidReef
public MoveAndAvoidReef(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
-
MoveAndAvoidReef
public MoveAndAvoidReef(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
-
MoveAndAvoidReef
public MoveAndAvoidReef(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
-
drawImpl
public void drawImpl()Description copied from interface:Drawable
Draw to AdvantageScope unconditionally.
-