PathPlanner implementation for WPILib Trajectories

We have used WPILib’s onboard trajectory generation for the 2020 season and even though it was ok, we didn’t have a way of visualizing the actual spline of the path. I know that WPILib is compatible with PathWeaver but it doesn’t support reverse path following and doesn’t visualize the robot fully (which PathPlanner can do both). But the problem is PathWeaver and PathPlanner has different units for the curvature of the spline. PathPlanner gives curvature as curve radius and PathWeaver gives it as radians/meters. I’ve tried translating curve radius to rad/m but can’t seem to find the correct function to do so. Has anyone tried something similar or have any idea how can this accomplished? Thanks in advance!

3 Likes

At least right now, we don’t have the bandwidth to rewrite PathWeaver to support what it needs to support. The relevant people should be available again in a few months, so we’re still planning on fixing PathWeaver for 2021. Until then, you could use https://github.com/FRC5190/FalconDashboard, which uses WPILib trajectory generation as its backend.

Curvature \kappa = \frac{1}{\text{turning radius}}. You might need to include a factor of 2\pi when converting from meters to rad/meter.

You do not, since per the OP the radius, and not the circumference, is specified.

I have tried 1/R method but when I plotted two similar trajectories’ curvatures, I got somewhat similar trending but different curves. That might be a mistake on my part since I can’t use the exact same path on both programs. I’ll definitely have a look at falcon dashboard. Thanks!