PathPlanner 2025 Beta

The first PathPlanner beta realease of the 2025 season has just been released! You can download the latest beta from here, and install PathPlannerLib through VSCode. The beta version of PPLib now uses a different vendor json file, so you will need to remove your 2024 PPLib install to install the 2025 beta. The main vendor json will be updated to the 2025 version with the kickoff release. The documentation has been updated for the beta. Note: Beta 1 currently requires WPILib 2024. Once the WPILib 2025 beta is released, PPLib will require the 2025 beta. Also, simulation on macos is not currently supported, this will be resolved once PPLib updates to use the WPILib 2025 beta.

This release focuses on the ground-up rework of PathPlanner’s trajectory generation, which aims to solve the shortcomings of the previous iteration and attempts to give PathPlanner trajectories a “just works” quality with little to no tuning, all while maintaining the ability to generate trajectories on-the-fly.

Beyond the trajectory generator rework, this release also includes new zoned event markers, “point towards” zones, the ability for event markers to function as a Trigger as an alternative to using NamedCommands, a path optimization tool in the GUI, updated support for Choreo 2025, and more. For people already familiar with PathPlanner and PathPlannerLib, I recommend checking out the docs again. Significant changes have been made to the settings, and there have been some changes to PPLib usage, such as configuring AutoBuilder, which is now condensed into a single configure method.

Improvements of Trajectory V2

Respects Swerve Dynamics

Trajectories are now generated with swerve kinematics/dynamics in mind to make sure each state is within the robot’s capabilities, increasing path following accuracy and consistency.

Motor Torque Based Acceleration Limits

Trajectory V2 uses the available torque output of your robot’s drive motors to limit the acceleration and deceleration along the trajectory. One of the issues with limiting acceleration of a module or the robot as a whole with a constant maximum acceleration/torque is that the robot’s drive motors are unable to provide constant torque throughout its entire RPM range. Therefore, they cannot maintain a linear acceleration, which requires the user to either reduce the maximum acceleration or velocity below the true maximum capabilities of the robot, or risk the robot falling behind the target acceleration when already near the max velocity. Essentially, you would have to choose between high speed or high accuracy.

Trajectory V2 now limits the acceleration of each module based on the maximum possible torque output of its motor. This uses the motor’s current RPM and current limit to get the true maximum torque output of the motor. The robot as a whole will only accelerate as much as the torque outputs from each motor would allow for. Furthermore, forces within the module due to friction are taken into account, which further limits the robot’s acceleration but aids in deceleration.

Arbitrary velocity/acceleration constraints can still be used via global constraints or constraint zones, and they will further limit the robot’s motion as long as the arbitrary constraints are within the robot’s capabilities.

Traction Control

The maximum torque applied by each drive motor is limited by the force of friction between the wheels and the carpet to prevent wheel slip. Furthermore, the maximum speed in curves is limited to prevent the wheels from slipping due to the centripetal forces it experiences.

Balanced Translation and Rotation

Translation and rotation speed is balanced to ensure that every rotation target is hit. The robot will now be able to slow down to give enough time for a rotation to complete.

Torque-Current Feedforwards

During generation, torque-current feedforwards are calculated at every state. Path following commands can now output these feedforwards along with the normal ChassisSpeed output, allowing Phoenix Pro teams using TorqueCurrentFOC control modes to utilize these values to further increase path following performance and accuracy. For teams using voltage output, the module’s acceleration is also provided, which can be converted to a voltage feedforward using the characterized kA value.

Other Notable Changes In Beta 1

Path Optimization

The path editor now includes a path optimizer tool that uses a genetic algorithm to adjust the shape of the path, minimizing the total trajectory runtime. The optimizer is not guaranteed to find the true “optimal” path shape, but it can still significantly improve the runtime of unoptimized paths. The optimizer can be run for multiple iterations if better results are desired.

Zoned Event Markers & Event Triggers

Event markers now have the option of including an end position. If a marker is zoned, its associated command will start when the robot enters the zone, and be stopped when it exits the zone. Event markers can now also be used as triggers based on the name they are given in the GUI. For zoned markers, event triggers will remain high while within the zone, and go low when leaving. If a marker is unzoned, its trigger will go high for one loop. Using events as triggers allows for much more complex behavior than NamedCommands, by binding different commands to a marker going high/low, combining multiple event triggers together to handle overlaps, or combining event triggers with other custom triggers to react to sensor reading, for example.

Future beta releases will expand on this concept by allowing for the creation of triggers on individual PathPlannerAuto commands to create more customizable/complex auto behaviors on a per-auto basis.

“Point Towards” Zones

Point towards zones are zones within a path where the robot should aim at a target position on the field. For example, this can be used to track a goal position while following a path. Overriding rotation feedback while in this zone can further increase aiming accuracy. In a future beta release, you will be able to bind commands to a trigger controlled by entering/exiting a point towards zone to easily switch on/off a rotation feedback override.

Replanning Removed

Path replanning has been removed for various reasons. First and foremost: it seemed to cause more issues than it solved. It is very difficult to create a generalized replanning solution that works for everybody. Everyone expects it to work a little bit differently, and it can’t really work perfectly for everyone. It tended to cause a lot of confusion for some people, so I think it is best to remove the generalized solution and leave any complex replanning up to individual teams to implement according to their needs if they want such a feature. Furthermore, the computation requirements for trajectory generation has significantly increased. Teams heavily relying on replanning to stich their autos together would experience noticeably higher generation time if they were constantly generating new paths throughout auto mode instead of using the pre-generated “ideal” trajectory.

Torque-Based Swerve Setpoint Generator (Currently Java Only)

A custom version of FRC team 254’s SwerveSetpointGenerator which generates setpoints based on available motor torque instead of a maximum acceleration. Also includes various other limits carried over from the generation algorithm, such as limiting torque to maintain traction and limiting module heading changes to prevent sliding. This implementation uses the same configuration object as trajectory generation, making setup quick and easy.

Override Correction Feedback

Methods have been added to PPHolonomicDriveController that allow for overriding the X, Y, and rotation feedback/correction while path following. This can be used to correct the robots X/Y velocity or rotation velocity to target a game piece or goal, while still using the feedforward velocities from the trajectory.


As usual, I appreciate anyone who spends the time time test these beta releases, and highly value any feedback/issue reporting on the github issues page. Good luck to everyone in 2025!

79 Likes

Every year, I think, “Mr. Jansen” can’t outdo himself this year. Every year, I end up being wrong. I’m excited to see how traction control works out.

11 Likes

You absolutely cooked with this one. Seeing this and the choreo post makes me absolutely stoked for auto this year!

3 Likes

Do all the torque stuff require/work better with actual torque current control provided by phoenix pro?

1 Like

Not required. Only thing that could “work better” would be if you used the torque current feedforwards which could help with path following performance. But, an acceleration for each module is also provided which can be converted to a voltage feedforward as an alternative if you don’t/can’t use phoenix pro.

1 Like

This is pretty awesome- just a bit sad that replanning, which was nice for modular autos, is gone. I’m especially intrigued by the path optimizer- how does that compare to Choreo?

Thanks for this awesome library, can’t wait to try these new additions.

1 Like

Yeah, just didn’t seem like a good thing to support anymore with how much confusion it caused some people. It’s also not great performance wise with the increase in generation complexity. So sort of forcing people to link up waypoints and avoid needing to regenerate paths all the time makes a big difference.

It really doesn’t, lol. It’s a whole lot slower and much, much simpler. It basically exists as a tool to shave some time off of paths you make in the pathplanner GUI, since placing control points by hand will likely create a path shape that is slower than it needs to be. No fancy constraints or other stuff that Choreo does. It basically just adjusts control point placement looking for faster paths.

4 Likes

Are their any features that you would take from Choreo? If not, is there any compatible between both programs to use each other’s features?

And down the line, is their any thoughts of joining forces with the Choreo team and have a all-in-one solution to Path Planning?

There’s quite a few things I’ve already taken inspiration from. PPLib can be used to load choreo trajectories and choreo supports pathplanner style event markers. But there’s only so much compatibility/yoinking that can be done with 2 apps that take 2 fundamentally different approaches to path planning.

I personally believe having multiple options benefits everyone. Pathplanner might work better for one team while Choreo works best for another. Both apps existing in the same space taking inspiration from the other and trying to improve upon it makes them both better which benefits anyone that uses either of them. Pathplanner is a much better app this year than it would have been if choreo didn’t exist last year.

They also really can’t be joined together in any meaningful way since again, they’re fundamentally different approaches. Choreo is entirely based on optimization while PathPlanner takes an algorithmic approach to generating trajectories. A lot of stuff in PPLib relies on being able to generate trajectories fairly quickly on-the-fly like pathfinding. Optimization produces really good results, but not quite fast enough for that use case. Maybe the new control system will change that.

7 Likes

If I understand correctly (and I was only informed about PathPlanner’s optimizer a few days ago) it basically adjusts the control points of the spline, so it’s still a spline and the robot movement along that spline is still somewhat separated from the optimization logic, since a genetic algorithm makes random changes and keeps the ones that lead to smaller cost (path time).

I don’t know your math background so I’ll explain Choreo in fairly basic terms.
Choreo’s algorithm sets up the trajectory so that there is an actual closed-form equation for the path time (albeit in hundreds to thousands of variables). That equation can be combined with equations that associate high cost with violating constraints, all in a way that can let the algorithm apply an operation to the equation that solves for a lower-cost set of variables directly. Repeat this until the path time isn’t improving.

The above is a massive oversimplification, but what you’re getting in Choreo is being implemented directly off of fairly recent academic research. Numerical optimization is an active area of study.

7 Likes

I have a problem when I try to run any path / auto.
No errors are printed and when I try to run it looks like the output method that was passed in the auto builder isn’t running. When running the same method in the teleop it looks just fine so I don’t think it the output method and named commands also don’t work. I do not use feed forward, only chassis speed. Any guesses?

Did someone get it to work and can share an example code?

Just curious, do these changes also impact the performance of pathfinding?

1 Like

It seems PathPlanner just crashes on stratup on Windows. Running it from CMD doesn’t print any errors either.

Edition	Windows 11 Education
Version	23H2
Installed on	‎10/‎04/‎2024
OS build	22631.4169
Experience	Windows Feature Experience Pack 1000.22700.1034.0
1 Like

Would need to see some code to be able to know what’s going on.

I don’t believe it should be affected in a noticeable way, unless I broke something else along the way. The pathfinder itself is more or less unchanged, and will take the same amount of time to find paths. Generating the path from the pathfinder may take a bit longer. I tested the path generation on a RIO 1 a while ago and it was fine, but I forgot the exact time. I’ll do it again at some point.

It looks like you’re on a pretty new windows install so I’d guess that you’re missing some dependency that flutter needs. I’ve never been able to figure out exactly what this dependency is over the years, since I’ve already included every documented dependency, but you can try installing Visual Studio and make sure you install the Desktop development with C++ workload. If for some reason that still doesn’t work let me know.

1 Like

For anyone that already downloaded the GUI beta, there was a minor issue that wouldn’t apply the ideal starting rotation properly. The builds on the release page were updated to fix this so you should re-download it. This only affected the GUI so PPLib should be fine.

1 Like

having the same issue here

Edition	Windows 10 Home
Version	22H2
Installed on	‎1/‎17/‎2023
OS build	19045.4894
Experience	Windows Feature Experience Pack 1000.19060.1000.0

Try deleting this folder: %APPDATA%/com.mjansen4857/pathplanner

This is the config

image

this is the path

settings

and the auto call

image

Both the drive and named commands don’t work. I tried swapping the swerve output method to a print it didn’t print anything. Also tried non zero PID gains and still no luck.

Same issue here on mac. I also deleted the application support folder. When I reran the app it recreated the folder, so it is running to some extent.

ProductName:		macOS
ProductVersion:		15.0
BuildVersion:		24A335

Can you link to your repository?

defaults delete com.mjansen4857.pathplanner in terminal. mac has a bookmark thing for projects for security reasons. The flutter library that handles that causes crashes that I can’t prevent for whatever reason.