PathPlanner phoenix swerve issues

After following the pathplanner documentation, I found it hard to work with phoenix swerve. This redirected me to 6121’s competition repo:

After fixing up our code for our swerve, I got no errors on build, but deploying to robot resulted in a bootloop along with this error message from our robot:

Error at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:671): Unhandled exception: java.lang.RuntimeException: AutoBuilder was not configured before attempting to build an auto chooser
at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:671)
at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:658)
at frc.robot.RobotContainer.<init>(RobotContainer.java:70)
at frc.robot.Robot.robotInit(Robot.java:18)
at edu.wpi.first.wpilibj.TimedRobot.startCompetition(TimedRobot.java:107)
at edu.wpi.first.wpilibj.RobotBase.runRobot(RobotBase.java:365)
at edu.wpi.first.wpilibj.RobotBase.startRobot(RobotBase.java:453)
at frc.robot.Main.main(Main.java:13)

I’m not sure whats really going on, as there is a autobuilder configured in our swerve module command file. (like how is was in 6121’s)
if anyone has the time, I would greatly appreciate any help, as it is our first time doing swerve and pathplanner.

https://github.com/Team-5503/offseasonSwerve2024
(our code)

The repository you’ve linked to is inaccessible. Are you sure it’s public?

Anyways, the error message suggests that AutoBuilder.configureHolonomic is not being called before AutoBuilder.buildAutoChooser. Your code might not be calling configureHolonomic at all (for example, you might have put it in a method that never gets called) or you might be calling buildAutoChooser before configureHolonomic is called. Try looking through your code and making sure the order is correct.

Also, I would suggest referencing the CTRE PathPlanner example instead. Here’s the 2024 version: Phoenix6-Examples/java/SwerveWithPathPlanner/src/main/java/frc/robot at 6596a615256867e74b77538e87c4f5468178f767 · CrossTheRoadElec/Phoenix6-Examples · GitHub

just made the reop public, but I will look at CTRE’s pathplanner implementation during my robotics meeting

Your configurePathPlanner method in CommandSwerveDrivetrain.java is never called, so your auto builder is never configured. Just add a call in your constructor and it should be fixed.