|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Network Tables: Please explain like I'm 5
Specifically running it outside a robot program on a Win10 laptop and on a raspberry pi.
Assume I don't know anything about Maven repositories, or native paths, or external jars... because I don't. |
|
#2
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
I can explain how to use it, if that's what you want.
1. Clone https://github.com/wpilibsuite/ntcore 2. Code:
./gradlew :native:build -PskipArm 4. Use JARs in project Code:
NetworkTable.setClientMode();
NetworkTable.setNetworkIdentity("Name of my coprocessor or DS or whatever");
NetworkTable.setTeamNumber(5401);
NetworkTable.initialize();
// now get the network table that corresponds to the SmartDashboard class of WPILib
NetworkTable smartDash = NetworkTable.getTable("SmartDashboard");
// now use table to put data
smartDash.putNumber("VisionAngle", 42.0);
Then, Code:
./gradlew :arm:build -PcompilerPrefix="C:\Path\To\RPi\Toolchain\bin\arm-linux-gnueabihf-" Use JARs in code on Pi as above |
|
#3
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
I am actually working on a gradle build system to automatically set up for running on either a Raspberry Pi or a Windows desktop. You can see the example at https://github.com/wpilibsuite/Visio...ee/master/Java, and can download the zip with the entire setup at http://first.wpi.edu/FRC/roborio/cop...JavaGradle.zip.
The Readme has instructions on how to set everything up. It's built for running camera processing, but it's fairly easy to make it just do networktables, as its already setup to connect to networktables. |
|
#4
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
Will review, thanks. |
|
#5
|
|||
|
|||
|
Re: Network Tables: Please explain like I'm 5
This looks like something we can use. But:
<click on link> Forbidden You don't have permission to access /FRC/roborio/coprocessors/JavaGradle.zip on this server. TimO |
|
#6
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
|
|
#7
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
|
|
#8
|
|||
|
|||
|
Re: Network Tables: Please explain like I'm 5
@Thad
thanks - the gradle setup works for me. Appreciate the effort setting it up. |
|
#9
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
I don't know if that project will properly import into Eclipse. Haven't built with eclipse much. Although if you're getting an ntcore not found error, you probably have the wrong version set in the build script. Make sure it's set for windows if you are trying to run it on windows.
|
|
#10
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
But I did read your code, and try to mimic the NT lines. I had posted a question to the GRIP gutter chat and was told the set server and set team number were unnecessary in the latest versions of nt. Not true? I'm beating my head against a wall here. I know this is going to be the simplest, stupidest answer, and I'm 90% sure it's in my eclipse build path and not in the code. But every answer seems to require 6 more questions. |
|
#11
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Based on the error I'm getting, its picking up the libraries just fine. Within the libraries, when it executes the System.loadlibrary(ntcore) it can't find the file. It looks like on a windows system its looking for a windows directory. Should there be an ntcore.dll somewhere in my windows directories?
![]() |
|
#12
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
|
|
#13
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
And I'm happy to include the server commands, but if that's in the screensteps, I missed it. I asked about it because I stumbled on it in the 2013 screensteps on a google search. Thank you much. Hopefully I won't be back shortly with Pi problems. |
|
#14
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
|
|
#15
|
||||
|
||||
|
Re: Network Tables: Please explain like I'm 5
Quote:
First I tried loading the raspbian one to the pi directly, in the folder that I'm already calling from the java command line with a -D. Didn't work. Then I added the raspbian one in eclipse before building the jar, and that ran on the pi. Thanks much. Sorry for being a noob. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|