Our team is trying to use vision tracking to generate trajectories during autonomous. 2023 was our first season with a swerve drive, and this summer we have been using WPILib’s trajectory generator to create simple paths for the robot to follow. We want to be able to track game pieces and create a trajectory based on the robot’s position relative to the object. Would WPILib’s trajectory generator or PathPlanner’s on-the-fly path generation be more efficient and/or precise for autonomous programming? What are the pros of using PathPlanner?
I’ll start off by saying I haven’t used WPILib’s trajectory generator. We have exclusively used PathPlanner since we’ve started doing on-the-fly generation (which was this summer). What I will share is that once we got the boiler plate down, we’ve had no major problems with PathPlanner as a software (obviously many bugs though). The Majority of my problem have been with limelight calculation instead. I doubt that the efficiency is all that different, and I don’t know anything about precision although I’d guess they are pretty much the same. But again, not a WPILib tragectory expert.
The main benefit I’ve seen with path planner is the UI it has, it makes it really easy to create auto’s or debug trajectories and I’ve had a good experience. One downside is that from what I’ve seen the documentation is better for WPILib than for pathplanner which could definatly be a consideration.
WPILib’s Trajectory API is designed for differential drive robots only, and the GUI frontend for it, PathWeaver, is abandonware. The only alternative at this point is the thirdparty project PathPlanner. We haven’t considered adopting it/making it official because it makes design decisions we disagree with, and we don’t have anyone on the WPILib dev team who’d be willing to maintain it.
We have efforts ongoing now for a replacement for WPILib’s stuff, but it’s not ready yet.