I am using PathPlanner with a Swerve drive. I have a simple path set up here that moves the robot 5ft (1.4m) across the x-axis, with no y-axis movement.
I use a Command method to find the path from its file in the project files and then run it. However, instead of a straight line, the robot instead runs this path shown by the Field widget in Shuffleboard below:
Here is our code for reference. We use java (feat-pathPlanner branch):
PID values are set to 0 in Constants for testing purposes, although I doubt that PID would be responsible for an offshoot like this. What could be causing this to happen?
It looks like it’s not setting your starting pose, and then it’s replanning the path based on your position at (0, 0). I know PathPlanner can do this for you when you run a full auto, but I’m not sure if you have to do it yourself when you run a path alone (I’m guess you do.)