Good evening from team 564!
We have just generated our Swerve Project using Tuner X, and have starting implemented PathPlanner.
We’re currently running into an issue that’s got us stumped.
Whenever we call AutoBuilder.buildAutoChooser()
or AutoBuilder.buildAuto()
we get the following exception:
Error at com.pathplanner.lib.commands.FollowPathCommand.<init>(FollowPathCommand.java:86): Unhandled exception: java.lang.NoSuchMethodError: 'void com.pathplanner.lib.commands.FollowPathCommand.addRequirements(java.util.Collection)'
at com.pathplanner.lib.commands.FollowPathCommand.<init>(FollowPathCommand.java:86)
at com.pathplanner.lib.auto.AutoBuilder.lambda$configure$0(AutoBuilder.java:78)
at com.pathplanner.lib.auto.AutoBuilder.followPath(AutoBuilder.java:257)
at com.pathplanner.lib.auto.CommandUtil.pathCommandFromData(CommandUtil.java:79)
at com.pathplanner.lib.auto.CommandUtil.commandFromJson(CommandUtil.java:46)
at com.pathplanner.lib.auto.CommandUtil.sequentialGroupFromData(CommandUtil.java:87)
at com.pathplanner.lib.auto.CommandUtil.commandFromJson(CommandUtil.java:47)
at com.pathplanner.lib.commands.PathPlannerAuto.initFromJson(PathPlannerAuto.java:455)
at com.pathplanner.lib.commands.PathPlannerAuto.<init>(PathPlannerAuto.java:85)
at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooserWithOptionsModifier(AutoBuilder.java:432)
at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:391)
at com.pathplanner.lib.auto.AutoBuilder.buildAutoChooser(AutoBuilder.java:379)
at frc.robot.RobotContainer.<init>(RobotContainer.java:57)
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.lambda$startRobot$0(RobotBase.java:433)
at java.base/java.lang.Thread.run(Thread.java:833)
My current theory is that I’m setting up the AutoBuilder incorrectly, but I should mention that we had to mess with PathplannerLib-beta.json
to get it running, so It could be that too.
Any and all help is greatly appreciated!