Motion Profiling Help

We’re trying to use the Pathfinder library for Motion Profiling in our autonomous code. When we try to run our autonomous code, the robot crashes and prints these errors:

ERROR  1  Unhandled exception: java.lang.UnsatisfiedLinkError: no pathfinderjava in java.library.path
Warning at edu.wpi.first.wpilibj.RobotBase.main( Robots should not quit, but yours did! 
ERROR  1  The startCompetition() method (or methods called by it) should have handled the exception above.

Which leads us to this bolded line of code that isn’t erroring in eclipse, but is somehow crashing the robot:

firstRun = true; 
Trajectory.Config testConfig = new Trajectory.Config(Trajectory.FitMethod.HERMITE_CUBIC, Trajectory.Config.SAMPLES_HIGH, timeStep, maxVel, maxAccel, maxJerk);
**Trajectory testTrajectory = Pathfinder.generate(testPoints, testConfig);**
TankModifier testModifier = new TankModifier(testTrajectory).modify(wheelBaseWidth);
testLeftTrajectory = testModifier.getLeftTrajectory();
testRightTrajectory = testModifier.getRightTrajectory();
testEncLeft = new EncoderFollower(testLeftTrajectory);
testEncRight = new EncoderFollower(testRightTrajectory);
testEncLeft.configureEncoder(, ticksPerRev, wheelDiameter);
testEncRight.configureEncoder(, ticksPerRev, wheelDiameter);
testEncLeft.configurePIDVA(p, i, d, velocityRatio, accelGain);
testEncRight.configurePIDVA(p, i, d, velocityRatio, accelGain);

If anyone has any thoughts or solutions please add them below. Thanks!

It is rather hard to provide any help without seeing the code around the bit that is crashing. Do you have a github?

Yep, here is the github project. GitHub - Team303/2017-Mo-Pro-Code

I just had the same symptoms when trying to use the new CTRE libraries. As I understand, simply adding an external JAR to a robot project in Eclipse doesn’t work. Rather, external dependencies must be put into the proper spot (~/wpilib/user/<lang>/lib on Linux or macOS). The plugins will automatically add them in as both development and build dependencies.

Yep, I have the Pathfinder-Java file the specified folder as shown above.

We’re seeing the same thing. We’ve tried putting the .so files in wpilib/user/java/lib and wpilib/java/current/lib.

We’re having the same issue as well.
We followed the instructions for WPILib installation on the Pathfinder github wiki. Has anyone using Toast and GradleRIO experienced this as well?

It doesn’t look like there’s a Pathfinder release for 2018 yet. If you’re using the 2017 release, it’s likely the .so is failing to load because there was a compiler/ABI change between 2017 and 2018.

Yes, the 2017 version is linked against c++ version 20; the rio currently deploys 21. We made a symlink from 20 to 21 and got it running, but that’s clearly not the best solution.



Peter and Jeremy are correct, you’re using an old version of Pathfinder compiled for 2016/2017 RoboRIO.

You can get the 2018-Stable releases through maven instead of github-releases. The process is outlined in the Pathfinder README

Thanks Jaci!
We got it working now, next we need to tune everything…