Class MoveAndAvoidReef

java.lang.Object
edu.wpi.first.wpilibj2.command.Command
frc.robot.commands.MoveAndAvoidReef
All Implemented Interfaces:
Sendable, Drawable

public class MoveAndAvoidReef extends Command implements Drawable
Move to Pose2d
  • 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 Subsystem
      pose2dSupplier - Pose2d Supplier
      maxSpeedSupplier - maximum speed to move at
      flipForRed - Whether to flip the pose2d for red alliance
      tol - Translational Tolerance
      rotTol - 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 Subsystem
      pose2dSupplier - Pose2d Supplier
      maxSpeedSupplier - maximum speed to move at
      flipForRed - Whether to flip the pose2d for red alliance
      tol - Translational Tolerance
      rotTol - Rotational Tolerance
      autoRoutine - 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 Subsystem
      pose2dSupplier - Pose2d Supplier
      flipForRed - Whether to flip the pose2d for red alliance
      tol - Translational Tolerance
      rotTol - Rotational Tolerance
      autoRoutine - Choreo AutoRoutine to integrate command
  • Method Details

    • active

      public Trigger active()
      Returns a trigger that is true while the trajectory is scheduled.
      Returns:
      A trigger that is true while the trajectory is scheduled.
    • done

      public Trigger done()
    • initialize

      public void initialize()
      Overrides:
      initialize in class Command
    • execute

      public void execute()
      Overrides:
      execute in class Command
    • end

      public void end(boolean interrupted)
      Overrides:
      end in class Command
    • isFinished

      public boolean isFinished()
      Overrides:
      isFinished in class Command
    • drawImpl

      public void drawImpl()
      Description copied from interface: Drawable
      Draw to AdvantageScope unconditionally.
      Specified by:
      drawImpl in interface Drawable