Class SwerveAutoBuilder

java.lang.Object
com.marslib.swerve.SwerveAutoBuilder

public final class SwerveAutoBuilder extends Object
Encapsulates the static configurations for PathPlanner's AutoBuilder. Kept independent from the main drivetrain subsystem to allow headless mock testing.
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.wpi.first.wpilibj2.command.Command
    alignToPoint(SwerveDrive drive, Supplier<edu.wpi.first.math.geometry.Pose2d> target)
    Generates a command that automatically paths the robot to the specified target utilizing PathPlanner's physics-constrained solver to avoid field obstacles dynamically.
    static void
    Configures PathPlanner's AutoBuilder for autonomous path following.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • configure

      public static void configure(SwerveDrive drive)
      Configures PathPlanner's AutoBuilder for autonomous path following.
      Parameters:
      drive - The SwerveDrive subsystem instance for method references and command requirements.
    • alignToPoint

      public static edu.wpi.first.wpilibj2.command.Command alignToPoint(SwerveDrive drive, Supplier<edu.wpi.first.math.geometry.Pose2d> target)
      Generates a command that automatically paths the robot to the specified target utilizing PathPlanner's physics-constrained solver to avoid field obstacles dynamically.
      Parameters:
      drive - The SwerveDrive logic
      target - A supplier of the absolute field pose to navigate to.
      Returns:
      A Command orchestrating the autonomous drive.