Go to Post the golden rule of robotics for the 21st century: Do unto robots as you would have them do unto you - KenWittlief [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 13-02-2016, 12:19
1024Programming 1024Programming is offline
Registered User
FRC #1024
 
Join Date: Jan 2014
Location: Indiana
Posts: 43
1024Programming is an unknown quantity at this point
GRIP with kangaroo

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.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:37.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi