Pathplanner driving too far

Hello, this is the first year we are using path planner and java. We have managed to get some basic autonomous paths with BaseFalconSwerve working but for some of those paths, the robot goes too far. This only happens for select paths and we’ve tried to isolate the problem but it doesn’t seem to be an error in the code. Here is the link to our code: GitHub - Respawn-Robotics/Swiss-Cheese: Prototype Robot Code

We’ve tried running basic paths like making the robot move 2 meters but it overshoots and goes to around 2.33m which is the length of the path plus half the size of the robot. We tried running the test with different auton lengths such as 2.5m and it goes to 2.5 perfectly but for some reason, it seems to overshoot with the 2m. We suspect it might be a problem with the Pathplanner export onto our project but we’re not sure. Any help would be appreciated.

Have you played around with adjusting your values here under auto constants?

These can be tuned to your robot from the base code values. You can do some trial and error and get a feel for how distances change based on that. kPX, kPY, and theta if you can test it.

We had an issue where we had one of the spline handles drug out to far causing the robot path to be past the point and then come back to it.

It does show the robot going too far when you play the path when this happens and is ultimately how we found our mistake. Could be the problem

After some tuning we got it to go the correct distance. Thank you for the help.

1 Like

Great to hear! Be sure you look at all of the TODO comments in the base swerve code, they aren’t all mentioned in the readme. And then update your own readme to include them for future reference.

Best of luck!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.