Log in

View Full Version : NetworkTables rPi


axton900
23-02-2016, 06:30
Hi!
Is it possible to install NetworkTables(c++) for our pi? We want to run c++ openCV scripts and use NetworkTables to grab the values and bring them back to the Rio.
Thanks!

weaversam8
23-02-2016, 06:42
It is possible, I believe. We run it in Python with the pynetworktables library, so I'm sure there's one for C++.

virtuald
23-02-2016, 10:58
https://github.com/PeterJohnson/ntcore

axton900
23-02-2016, 18:57
That requires the use of toolchains which is not supported by Raspbian. Is there any other way?

virtuald
23-02-2016, 23:42
That requires the use of toolchains which is not supported by Raspbian. Is there any other way?

I would recommend searching these forums, I'm sure someone else has done it.

axton900
27-02-2016, 13:21
If anyone knows how, if they could explain the process of doing this or point me in the right direction, then I would be very grateful!

Thanks!!

Thad House
27-02-2016, 13:33
If anyone knows how, if they could explain the process of doing this or point me in the right direction, then I would be very grateful!

Thanks!!

I was able to do it a while ago. As long as you are running the lastest raspbian, it should have GCC 4.9, and compile correctly. It just takes a while. You might have to use cmake, I don't remember.

simon-andrews
27-02-2016, 13:37
As Thad said, you can compile directly on the Raspberry Pi. CMake is definitely the easier option.

Should be something like:

cd ntcore
cmake .
make
sudo make install


Then when you compile you would add the "-lntcore" flag to G++.

I remember Java giving some trouble with compiling. If it does run "cmake . -DWITHOUT_JAVA=true" instead.

axton900
27-02-2016, 17:37
Thanks for the help! We really appreciate it!

JefferMC
27-02-2016, 22:54
There is a version of ntcore built for the Raspberry Pi 2/Debian for use with GRIP. You might want to look at:

https://github.com/WPIRoboticsProjects/GRIP-SmartDashboard/releases/tag/v0.1

axton900
01-03-2016, 15:33
I'm running into an error after installing and compiling and using the -lntcore prefix but I'm getting the error, "error while loading libraries, libntcore.so.1 cannot open shared object file: No such file or directory" What should I do?

simon-andrews
05-03-2016, 10:42
You need to append /usr/local/lib to your library path. CMake installs libntcore.so to /usr/local/lib which is not on the library path by default. This answer on StackOverflow answers the question better than I can. (http://stackoverflow.com/a/21173918/4541644)

Sorry for the late response and I hope this helps!

billbo911
05-03-2016, 10:49
I have a quick question for you. Depending on your response, I might have an alternate solution that works well for us.
I believe I know the answer, but the question is, are you running your RPi on the robot? In other words, are you doing your vision processing on the RPi on the robot.?

axton900
22-03-2016, 17:02
Yes, yes we are. We seemed to have it working now but we are eager to hear your alternate solution :) Sorry for the late response!!