We are trying to use grip with a Kangaroo. We have followed the screensteps documentation but it doesn't have a lot of information about running grip on startup. We are using this code to try and send values from the kangaroo network tables to the rio network tables:
Code:
import edu.wpi.first.wpilibj.networktables.NetworkTable;
public class main {
public static void main(String[] args){
NetworkTable localTable;
NetworkTable rioTable;
while(true){
NetworkTable.setClientMode();
localTable = NetworkTable.getTable("localhost");
rioTable = NetworkTable.getTable("10.10.24.62");
double[] centerx =localTable.getNumberArray("centerX", new double[0]);
double[] centery =localTable.getNumberArray("centerY", new double[0]);
double[] area =localTable.getNumberArray("area", new double[0]);
double[] height =localTable.getNumberArray("height", new double[0]);
double[] width =localTable.getNumberArray("width", new double[0]);
double[] solidity =localTable.getNumberArray("solidity", new double[0]);
for (int i = 0; i < centerx.length; i++) {
rioTable.putNumber("CenterX", centerx[i]);
}
for (int i = 0; i < centery.length; i++) {
rioTable.putNumber("CenterY", centery[i]);
}
for (int i = 0; i < area.length; i++) {
rioTable.putNumber("Area", area[i]);
}
for (int i = 0; i < height.length; i++) {
rioTable.putNumber("Height", height[i]);
}
for (int i = 0; i < width.length; i++) {
rioTable.putNumber("Width", width[i]);
}
for (int i = 0; i < solidity.length; i++) {
rioTable.putNumber("Solidity", solidity[i]);
}
}
}
}
we get this error when compiling:
Code:
platform: /Windows/amd64/
Exception in thread "main" java.lang.UnsatisfiedLinkError: no ntcore in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at edu.wpi.first.wpilibj.networktables.NetworkTablesJNI.<clinit>(NetworkTablesJNI.java:57)
at edu.wpi.first.wpilibj.networktables.NetworkTable.initialize(NetworkTable.java:42)
at edu.wpi.first.wpilibj.networktables.NetworkTable.getTable(NetworkTable.java:176)
at main.main(main.java:9)
If someone knows a way to do this or a solution to our code, please let us know.