This has been something I have always stumbled upon. This year, I am aiming to seamlessly integrate two systems together, one being the main robot code written in Java, and the other being the vision code running in C++. I am going to have my vision code run in Embedded Linux (ARM). I have not been able to find any good source for a library that will allow me to easily use NetworkTables.
Please point me to some resources. I wish to create a thread with a good answer so anyone else shot in the dark like me will have an easy time
Good Luck and Thanks!
Good Luck with your season and competitions!
Yes, you can extract the pieces that you need and compile them all together.
pynetworktables is a python program, and setup.py dictates what files are compiled and how they go together. However, if you use the source code that I linked to above, and compile it all together, you should end up with something that will be usable from C++. It may not be pretty, but currently nobody provides an easy way to build NetworkTables from C++.
Why go through the hassel of using network tables. My experience with it is the bugs are not worth the trouble.
Create a simple TCP socket between the C++ code and the Java code.
Make the robot the server, and the c++ code the client and send ascii data between the two.
Make sure you run the read/write in their own threads so there is no i/o blocking.
You can control the communications, the ports, and the data being sent - no need for network tables really.
Use pthreads on the C++ side, and ServerSocketConnectionclass on the java (crio) side. Those classes are already apart of the codebases you are targeting and no need to have additional interpreters installed or rely on WPI library implementation.
Yeah. I need to give that a try. First, however, I need to get our pretty ODROID up and running
I realised that the ODROID that we recieved is twice as powerful as my new laptop and much more powerful than any of our team’s laptops!