I am using PathPlanner to create an auto path, all it does is go in a straight path for 2 meters then stops. Nothing special. However, I am encountering an issue with finding the path file.
I have already configured AutoBuilder (ramsete controller), and in my RobotContainer class I have this code that follows the path:
...
public Command getAutonomousCommand() {
PathPlannerPath path = PathPlannerPath.fromPathFile("test");
// An example command will be run in autonomous
boolean isConfigured = AutoBuilder.isConfigured();
System.out.print(isConfigured);
//DriverStation.reportError(AutoBuilder.isConfigured(), false);
return AutoBuilder.followPathWithEvents(path);
}
However, when enabling autonomous mode, i get this error. It appears that the program can’t find the pathplanner path, and throws an error. I’ve doubled checked my pathplanner program; I have the right path and I’ve opened the correct project.
java.io.FileNotFoundException: /home/lvuser/deploy/pathplanner/paths/test.path (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at java.base/java.io.FileReader.<init>(Unknown Source)
at com.pathplanner.lib.path.PathPlannerPath.fromPathFile(PathPlannerPath.java:219)
at frc.robot.RobotContainer.getAutonomousCommand(RobotContainer.java:69)
at frc.robot.Robot.autonomousInit(Robot.java:60)
Here is a screenshot of my pathplanner with the test path opened
and here is my project
I’ve also clicked the deploy button a couple times, but it always fails. So i deployed using vscode.
I think I’m doing something wrong with the pathplanner program, but I don’t know what the issue is here?
Thanks for any help.