Having issues using both Network Tables and Camera Server and wondering if anyone has gotten it to work on the Romi or if support for it is still work in progress. I saw some talk on WPILib on a PI + Romi? - Programming - Chief Delphi about using cameras but figured I would create a separate topic for things people are doing to expand the Romi from the basics (onboard DIO, drivetrain, encoders, gyro) to more advance integration with the rpi.
Network Tables: My initial thought around using network tables is to use it as a way to communicate sensor information for misc sensors and CV2 vision programs (seems like the best way since the RPI gpio outputs are 3.3v and Romi inputs are 5v, same issue as with the Roborio).
I’m getting an error when using the default vision application
Built-in multi-camera streaming and can see multiple attempts to connect to the network tables port with this error:
NT: ERROR: select() to 10.0.0.2 port 1735 error 111 - Connection refused (TCPConnector.cpp:175)
I have tried changing the ipv4 address and team numbers to match (10.0.0.2 with team number 0 and 10.72.72.2 with team number 7272) but that results in the same. I can see the error message change
Camera Server: I am trying to start with a basic camera server and have it show in the smart dashboard. Usually this only requires one line of code to call startAutomaticCapture. I have tried a few ways and can’t get the camera feed to carry through from the rpi to the robot + smart dashboard.
CameraServer.getInstance().startAutomaticCapture(); //Should not work because the default name is "USB Camera 0" CameraServer.getInstance().startAutomaticCapture("rPi Camera ", 0); //Use name that matches the output when starting the vision service CameraServer.getInstance().startAutomaticCapture("rPi Camera 0", "/dev/video0"); //try using the name and video device path
All of these result in a camera instance created in the network tables & smart dashboard. But with a black screen. I can see the camera is working on the rpi at http://wpilibpi.local:1181/ but the camera stream listed within the network table settings has a black image.
I assume that the issues are related to some networking or communication issue or some step missing.