diff --git a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java index 7a109ced..785f2ba7 100644 --- a/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java +++ b/src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java @@ -13,6 +13,7 @@ import com.pathplanner.lib.auto.AutoBuilder; import com.pathplanner.lib.commands.PathPlannerAuto; +import com.pathplanner.lib.commands.PathfindingCommand; import com.pathplanner.lib.path.PathConstraints; import com.pathplanner.lib.path.PathPlannerPath; import com.pathplanner.lib.util.HolonomicPathFollowerConfig; @@ -182,6 +183,10 @@ public void setupPathPlanner() }, this // Reference to this subsystem to set requirements ); + + //Preload PathPlanner Path finding + // IF USING CUSTOM PATHFINDER ADD BEFORE THIS LINE + PathfindingCommand.warmupCommand().schedule(); } /**