View Full Version : Using C++ network tables on Jetson TK1/TX1 (preferably tx1)
We are trying to use Network Tables in C++ on our Jetson board (which has the Nvidia modified Ubuntu 14.04 ARM OS). We built ntcore's (the Network Tables' library name) source code from GitHub and it did not work. Upon building a bunch of resolving errors in the headers of the network tables code, which most of relate to things scoped in std, which leads us to suspect that the ntcore code on GitHub only works on the Windows OS.
We would be happy if anyone could help us finding an implementation of Network Tables for C++ for the Jetson TK1 and TX1.
fsilberberg
26-01-2016, 12:03
I assume that you found Peter's mirror of the source on Github? If that's the case, that is the full ntcore implementation, and compiles on Windows, Mac, Linux, and for the roborio. I imagine it will compile for the Jetson as well, but might take a bit of build fiddling (nothing to the actual sources though). I have a few questions:
How are you attempting to compile for the Jetson? Are you using a cross compiler, or just compiling on the Jetson directly?
Have you seen the ScreenSteps with general WPILib build concepts? It's here: http://wpilib.screenstepslive.com/s/4485/m/wpilib_source
Peter Johnson
26-01-2016, 14:38
If you're seeing errors in references to std::, the most likely culprit is the compiler version and/or compiler flags. The ntcore library extensively uses C++11 features, so you will need to use a fairly recent g++ (4.8.x or better) and also provide the -std=c++11 (or -std=c++1y) compiler flag.
However, the gradle and/or cmake build scripts should take care of this for you. As fsilverberg mentioned, ntcore is not Windows specific and is being built across multiple OS's and architectures, including Linux on both x86 and ARM.
Please feel free to file an issue on github (https://github.com/PeterJohnson/ntcore/) and we can move this discussion there.
Thad House
26-01-2016, 14:44
We are trying to use Network Tables in C++ on our Jetson board (which has the Nvidia modified Ubuntu 14.04 ARM OS). We built ntcore's (the Network Tables' library name) source code from GitHub and it did not work. Upon building a bunch of resolving errors in the headers of the network tables code, which most of relate to things scoped in std, which leads us to suspect that the ntcore code on GitHub only works on the Windows OS.
We would be happy if anyone could help us finding an implementation of Network Tables for C++ for the Jetson TK1 and TX1.
The build on GitHub definitely compiles for Arm. What version of GCC is on the device? GCC 4.9+ is known to work on Arm devices. GCC 4.8 should work to, but I'm not sure on that one. With gradle, trying to run a default build on arm devices does not currently work (it fails when it sees the -m32 argument for gcc). However you can run ./gradlew :arm:build -PcompilerPrefix= and that should build correctly as long as you have the right GCC.
A group of us are working right now on getting Arm Builds for other devices. Right now the cross compiler we have that works on everything is GCC 5, but since most devices running debian based OS's don't have GCC 5, it requires loading a special libstdc++.so.6. If you want that, the latest build can be found here http://198.199.94.5/ntcore/cb4cc63/arm-linux-gnueabihf/. The special libstdc++.so.6 is located here http://198.199.94.5/ntcore/libstdc++.so.6. To run that, compile your program, and then when running your code, prepend your command with env LD_LIBRARY_PATH=/path/to/downloaded/libstd/.
Tom Bottiglieri
26-01-2016, 17:28
If you used jetpack to set up the jetson, you should have a valid cross compiler installed on the original host machine. I used this the other day to cross compile ntcore quite easily. ntcore's build system allows you to use a prefix on the compiler to specify any cross compiler.
If you want a pre-built solution, you can use this. Just run the build script on the Jetson. https://www.dropbox.com/s/8sz4synzktl87pe/network_tables.zip?dl=0
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.