Does anyone have any examples of PathPlannerLib being used to follow a trajectory?

We are trying to use pathplanner, but I can’t get some of their methods to work. Does anyone have pathplanner code that we could reference for this and would be willing to share?
Thank you in advance

From last year. Our command that just drove forward using a path planner path FRC2022/P0.java at main · Frc5572/FRC2022 · GitHub

I apricate the reply but this is my first year of FRC and the 1st thing I was taught was swerve = hard. I was hoping to see some code for a West Coast driveTrain.

I don’t have anything for west coast drive. A tank drive example should be very similar conceptually, just using a slight different command.

Here is 4469’s code from this past offseason:

GitHub Code

It hasn’t been kept up to date with all the latest PathPlanner updates but should be a good starting point. Also of note, we use a navX gyroscope so all the rotation inputs are negative to account for its being CW positive instead of the standard of CCW positive.

Edit: Also if you have specific questions, please feel free to ask so that you can develop an understanding of the code.

2 Likes