Class MoveToPos

All Implemented Interfaces:
Sendable

public class MoveToPos extends Command
Move to Position
  • Field Details

  • Constructor Details

    • MoveToPos

      public MoveToPos(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed, double tol)
      Move to Position
      Parameters:
      swerve - Swerve Drive Subsystem
      pose2dSupplier - Supplier of Pose2d
      flipForRed - 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 Subsystem
      pose2dSupplier - Supplier of Pose2d
      flipForRed - Flip the Pose2d relative to the Red Alliance
    • MoveToPos

      public MoveToPos(Swerve swerve, Supplier<Pose2d> pose2dSupplier, boolean flipForRed)
      Move to Position
      Parameters:
      swerve - Swerve Drive Subsystem
      pose2dSupplier - Supplier of Pose2d
      flipForRed - Flip the Pose2d relative to the Red Alliance
    • MoveToPos

      public MoveToPos(Swerve swerve, Supplier<Pose2d> pose2dSupplier)
      Move to Position
      Parameters:
      swerve - Swerve Drive Subsystem
      pose2dSupplier - Supplier of Pose2d
    • MoveToPos

      public MoveToPos(Swerve swerve)
      Move to Position
      Parameters:
      swerve - Swerve Drive Subsystem
  • Method Details

    • 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