We decided to use a Raspberry pi 3 to do vision processing this year. In order to communicate values with the RoboRIO, I’m trying to send a few numbers from the pi (python) to the RIO (java) using networktables.
Both the RIO and the pi are connected to the Radio via ethernet, and I am able to ping the RIO from the pi successfully. As well, I tested to make sure that each side could get and put numbers from their local version of the network table (they can). However, the pi and RIO can not get numbers that the other puts onto the table.
The RIO is currently set up with the static IP 10.6.86.2 (though I did try originally with the default, assigned IP ending in .23). Using isConnected() from the pi returns false, while the RIO returns true (I’m assuming this should always be the case because it’s the server). Unless Raspbian has a default firewall, there shouldn’t be anything on the pi to block I/O data.
This is the code being run from the pi. A loop should probably be made to run this in place of one of my team members spamming the run command into the terminal (out of frustration, of course), but I believe that it wouldn’t make too much of a difference. The only exception that I can think of would be that the pi isn’t being given enough time to connect to the network table and put its values up before killing off its end of the table.
And without making anyone root through this year’s code in search of fragments of network table lines scattered about, I’ll list what I’m doing from the RIO with generally where and the line number (at this moment): import NetworkTable from wpilib (outside the class, 11), declare NetworkTable piTalk (inside the class but outside of methods, 41), set NetworkTable to server mode (in robotInit, 105), set piTalk equal to the NetworkTable with the key (set on line 83) of “SmartDashboard” (in robotInit, 107), get the numbers with keys “angle” and “distance” from piTalk with default values 360 and 0 and put them onto the SmartDashboard so I can see them (in autonomous, lines 158 and 159).