We have configured our robot with AutoBuilder.configureRamsete(), and have also downloaded a newer version of pathplanner, and our path files are in the correct directory in our project file structure.
However, when we attempt to run our auto through Driver Station, we get this error from RIOLog:
Unhandled exception: java.lang.IncompatibleClassChangeError: class
com.pathplanner.lib.commands.PathPlannerAuto has interface
edu.wpi.first.wpilibj2.command.Command as super class
trueError at java.base/java.lang.ClassLoader.defineClass1(Native Method):
Unhandled exception: java.lang.IncompatibleClassChangeError: class
com.pathplanner.lib.commands.PathPlannerAuto has interface
edu.wpi.first.wpilibj2.command.Command as super class
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
here is our getAutonomousCommand() at the end of RobotContainer class
public Command getAutonomousCommand() {
// An example command will be run in autonomous
boolean isConfigured = AutoBuilder.isConfigured();
System.out.print(isConfigured);
//DriverStation.reportError(AutoBuilder.isConfigured(), false);
return new PathPlannerAuto("friday");
}
What do you mean by ‘newer version of PathPlanner’? If you are referring to the PathPlanner 2024 beta, you need to make sure that you are using the WPILib 2024 beta to ensure that it works and update the vendor libraries to their appropriate 2024 version as well. And if you plan on running this on a robot, you also need to flash your roboRIO to the 2024 Beta firmware.
I’m running into this issue too. I am using both PathPlanner and PPLib version 2024.0.0-beta-4, and I am only running simulations so there is no RoboRIO involved at this time. Only difference is that I’m using holonomic mode and have configured the AutoBuilder as such. Unhandled exception: java.lang.IncompatibleClassChangeError: class com.pathplanner.lib.commands.PathPlannerAuto has interface edu.wpi.first.wpilibj2.command.Command as super class
You need to use the 2024 WPILib beta. The error class com.pathplanner.lib.commands.PathPlannerAuto has interface edu.wpi.first.wpilibj2.command.Command as super class indicates you are using WPILib 2023.