"PathPlanner – Robot follows path but ignores rotations (using MAXSwerve)"

Hello everyone!

We are a rookie team, and we’re using the off-season to improve our autonomous mode. We’re currently testing PathPlanner, and after studying the documentation, we successfully integrated it into our code.

In our tests, the robot follows the path accurately, getting very close to the defined positions. However, we are having trouble with the rotations. The rotations programmed in PathPlanner are not being executed correctly, and in some cases, they don’t happen at all. We are using MAXSwerve as our drivetrain.

Has anyone experienced a similar issue? Any help would be greatly appreciated!

Here’s the link to our code on GitHub: GitHub - G8d8i/Swerve_Test_PathPlanner

For reference, we’ve also attached an image of the test trajectory we defined in PathPlanner.

To clarify the issue: the robot follows the trajectory correctly and finishes the autonomous routine in the correct position, but it doesn’t perform the rotations along the way. For example, the rotation expected between STEP 0 and STEP 1 doesn’t happen as planned.

This is a known issue with PathPlanner. It does not slow the trajectory down to ensure it can complete rotations. You have a few options here:

  1. Slow your trajectory linear speed and acceleration
  2. Use PathPlanner 2025 beta, which I hear tackles this issue to give you feasible, but not necessarily optimal paths.
  3. Use Choreo 2024, a tool which takes translation, rotation, and other limits like robot momentum. Choreo generates the fastest feasible paths, and its output can be loaded by PathPlannerLib 2024, so you wouldn’t need many code changes. It does have a steeper learning curve, but once you know how to take advantage of the tool, it provides paths that need much less tuning on average than PathPlanner.

I am the lead developer of Choreo, so I’ll try not to shill too much, but it sounds like the issues you’re currently experiencing are PathPlanner-specific, and you’ve already figured out how to get accurate trajectory tracking.

1 Like

Thank you for the tips, Amicus1! I’ll follow them.

Regarding your suggestions, my speed is already set to 1 m/s.

I’ll run some tests with PathPlanner 2025.

I also appreciate you introducing me to the Choreo tool; I’m exploring it now, as I wasn’t familiar with it before.

Are the teams facing this issue migrating to Choreo? Are there any other tests or solutions I could try?

I think you’ll have to increase the max module speed in the auto builder configuration. If you limit max module speed to 1m/s, it severely limits how fast the robot can rotate, especially while driving. If you want to limit the translational speed, that’s not the place to do it.

Generally, you always want to leave the max module speed as the true max module speed, and limit translational and turning speed elsewhere, either capping the desired chassis speeds in your drive function or somewhere else in the pathplanner config.

1 Like

I don’t really know how many people migrated because of this issue. Most that struggled with it had trouble when the PathPlanner algorithm was initially changed, for 2024. I do know that Choreo is intended to increase auto performance for teams that already figured out tracking/odometry/other prerequisites. It sounds like that’s exactly where your team is.

However, the max module speed fix suggested above is the correct resolution to this issue with PathPlanner.

Hi, everyone!

Sorry for the delayed response; we were running some tests on our end. AvocadoPeel’s tip really solved the problem! By increasing the speed to 3m/s, the robot completed the trajectory flawlessly!

Thank you so much, Amicus1 and AvocadoPeel, for the help!

1 Like