Help! Pathfinder one my computer

So I am currently working on a very simple graphing of jaci’s pathfinder trajectories. Here is the deal. I keep getting the “Exception in thread “main” java.lang.UnsatisfiedLinkError: no pathfinderjava in java.library.path” exception. I have the .jar file and the .so file because I am not running GradleRIO. I don’t know if the problem is the fact that it is not the robot and the native libraries only work on the robot. I’m so confused and I have dived to deep into this. I just want to have my code work. This is it if you need it.

package Main;

import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JPanel;

import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.event.ChartChangeEvent;
import org.jfree.chart.event.ChartChangeListener;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.jfree.ui.RectangleInsets;

public class GraphTrajectory {

	static double prevTime;
	static double originalTime = System.currentTimeMillis();
	static boolean run = true;
	static boolean disabled = false;
	
	public static void main(String args]) {
		
		final TrajectorySetup trajectorySetup = new TrajectorySetup();
		trajectorySetup.setup();
		
		//create and configure the window
		JFrame window = new JFrame();
		window.setTitle("Trajectory GUI");
		window.setSize(1200,1000);
		window.isResizable();
		window.setLayout(new BorderLayout());
		window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		
		final JButton button = new JButton("Load");
		window.add(button,BorderLayout.NORTH);
		
		//create xy line graph
		final XYSeries leftSeries = new XYSeries("Left To Right Movement");
		final XYSeries rightSeries = new XYSeries("Forward to Backward Movement");
		XYSeriesCollection dataset = new XYSeriesCollection(leftSeries);
		dataset.addSeries(rightSeries);
		JFreeChart chart = ChartFactory.createXYLineChart("X", "Y", "Percent Input", dataset);
		window.add(new ChartPanel(chart),BorderLayout.CENTER);
		
		
		
		button.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent e) {
				if(button.getText().equals("Load")) {
					
					button.setText("End");
					run = true;
					disabled = false;
					Thread thread = new Thread() {
						@Override public void run() {
							while(run) {
								if(System.currentTimeMillis() - prevTime >= 0.020) {
									try {
										leftSeries.add(trajectorySetup.leftXTrajectory(), trajectorySetup.leftYTrajectory());
										rightSeries.add(trajectorySetup.rightXTrajectory(), trajectorySetup.rightYTrajectory());
										prevTime = System.currentTimeMillis();
									}catch(Exception e) {}
								}
							}
						}
					};
				thread.start();
				}else if(button.getText().equals("End")){
					Thread starterThread = new Thread() {
						@Override public void run() {
							button.setText("Load");
							run = false;
							disabled = true;
						}
					};
					starterThread.start();
				}
			}
			
		});
		
		
		
		
		
		
		//show the window
		window.setVisible(true);
		button.doClick();
		
	}
}

package Main;

import jaci.pathfinder.Pathfinder;
import jaci.pathfinder.Trajectory;
import jaci.pathfinder.Waypoint;
import jaci.pathfinder.Trajectory.FitMethod;
import jaci.pathfinder.modifiers.TankModifier;

public class TrajectorySetup {
	
	double wheelBase_width = 30;
	Trajectory left, right;
	Trajectory.Segment segLeft, segRight;
	
	public TrajectorySetup() {
		
	}
	
	public void setup() {
		Waypoint] points = new Waypoint] {
				new Waypoint(0,0,90),
				new Waypoint(0,55,90)
		};
		Trajectory.Config config = new Trajectory.Config(FitMethod.HERMITE_CUBIC, 10000, 0.020, 4, 1, 0.5);
		Trajectory trajectory = Pathfinder.generate(points, config);
		TankModifier modifier = new TankModifier(trajectory);
		modifier.modify(wheelBase_width);
		left = modifier.getLeftTrajectory();
		right = modifier.getRightTrajectory();
	}
	
	public double leftXTrajectory() {
		for (int i = 0; i < left.length(); i++) {
			   segLeft = left.get(i);    
			}
			return segLeft.x;
	}
	
	public double leftYTrajectory() {
		for (int i = 0; i < left.length(); i++) {
			   segLeft = left.get(i);    
			}
			return segLeft.y;
	}
	
	public double rightXTrajectory() {
		for (int i = 0; i < right.length(); i++) {
			   segRight = right.get(i);    
			}
			return segRight.x;
	}
	
	public double rightYTrajectory() {
		for (int i = 0; i < right.length(); i++) {
			   segRight = right.get(i);    
			}
			return segRight.y;
	}

}

I have referenced Pathfinder and my other two jar that I need to run the graph, which those two run fine and I don’t have any problems with them. I just can not run anything on my computer with the pathfinder.

You’ve answered your own question I believe: the reason that you’re getting the UnsatisfiedLinkError is because the native library file isn’t found on the robot. If you push that file to the robot in the same directory that you push the robot code JAR (i.e.: /home/lvuser/) you should be good.

Whoops, read your question wrong, but you still got your question right; the native library I believe is built for Linux Athena which is the OS for the RIO. You need to build the natives for your specific OS.

The 1.5 release on GitHub appears to have a JAR file with JNI builds for the big 3 operating systems.

The problem was the fact that I had not yet done cd /User/…/Pathfinder-Core/
then ./gradlew build. Then I just linked the jar file in my project in eclipse to the native libraries under the /build/…/shared/ folders in both Pathfinder-Core and Pathfinder-java. Then I was good. I hope the helps others. You can message me with any questions you may have. I will try to answer them.

Im going to try to embed my youtube video here. If it doesn’t work, oh well

Whatever. The link to my video is https://www.youtube.com/embed/ySsRsQlooWY

I have just started to look at pathfinding and Motion Profiling and all this GREAT Drive control stuff. I want to deliver this to the team and help students understand as well. There are currently two threads talking about this and this one seemd to touch on the step I’m currently hung on.

On the Github page for installing the files I don’t understand what I’m to do here:

Building / Installing on your Architecture
If you want to use Pathfinder on your system, you will have to build the library for your platform. You can do this with the following:

./gradlew build
The native libraries will be located under ./Pathfinder-Core/build/libs/pathfinder/ (shared and static libs, platform=any64) and ./Pathfinder-Java/build/libs/pathfinderjava/shared/any64. If you're using native shared (or java), you must put these somewhere on your system load path (e.g. Mac/Linux = /usr/local, Windows = Somwhere on PATH)

Feels like this is what I’m to do: