NetworkTables rPi

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!

It is possible, I believe. We run it in Python with the pynetworktables library, so I’m sure there’s one for C++.

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.

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.

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.

Thanks for the help! We really appreciate it!

There is a version of ntcore built for the Raspberry Pi 2/Debian for use with GRIP. You might want to look at:

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?

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.

Sorry for the late response and I hope this helps!

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.?

Yes, yes we are. We seemed to have it working now but we are eager to hear your alternate solution :slight_smile: Sorry for the late response!!