2020 PathWeaver challenges

Our team successfully used PathWeaver in 2019 with the Talon SRX motion profiling. This year we fired up PathWeaver to discover there is a whole new framework for path planning in WPILib. It looks exciting, but we are having trouble getting it working.

We quickly got odometry working successfully (the biggest challenges were converting units to meters and understanding the correct way to specify the heading from the gyro reading). After a few more hours of work, we have successfully been able to generate a trajectory on-the-fly with WPILib’s new framework and our robot will drive the trajectory.

Even though we have had success with trajectories generated on-the-fly, we cannot get the PathWeaver generated paths to run successfully. We are loading the generated JSON file into a trajectory with TrajectoryUtils and then running a Ramsete command, the same way we are with our generated path. The robot does drive, and it appears to head in the right direction, but the command finishes before the robot reaches the end pose.

Has anyone else dug in yet and tried to use PathWeaver generated paths with the 2020 WPILib? Have you had success? What struggles did you have?


After many hours, we have successfully followed a PathWeaver generated path. I’m not not certain what the issue was, but a few things changed. There is a new version of PathWeaver available in the WPILib update, so we upgraded.

We decided to ditch the paths we were using and create new ones. The paths we were testing with started at (0, 0, 0º) and our robot also starts in the pose, so we were not transforming the path to our robot’s pose. The path we successfully ran did not start at (0, 0, 0º) so we transformed the path to match the robot’s pose using transformBy. This may have also been a key component of getting it working.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.