Streaming from 3 Cameras

Hello there! Our team has decided to have three 170° cameras on the robot this year, one facing forward, one backward, and one on our climber. Currently, we have one camera plugged into USB Port 0 on the roboRIO and the remaining two cameras plugged into a USB Hub that is plugged into USB Port 1 on the roboRIO. When using Lifecams, we have code that can display two cameras on the dashboard, and swap views between our back camera and our climber camera with a button press while still displaying the front camera. However, once we begin using 170° cameras, we run into the issues, and none of the cameras display to the dashboard. However, we also get no indication of bandwidth when this happens, so we have no way of knowing if that is the issue. I have tried turning down resolution and frame rate to their minimum values as well as turning compression to 100% both on the dashboard and in the code, which should result in the cameras being well within the bandwidth limit, given that each camera runs at about 0.3-0.4 mbps in this state, but still nothing displays on the dashboard, instead saying that it is attempting to connect to the robot’s IP address. We tried plugging two of the cameras into the USB ports on the roboRIO and one into the USB port on our Limelight, but this results in only the camera from the Limelight displaying to the Dashboard. In addition, streaming through the Limelight USB port uses above 2 mbps just for the one camera plugged into it.

What do you think our issue is, and how can we fix it? Or, if you don’t think that we can run three cameras in any of the ways we have attempted, what other methods should we try? Your support is greatly appreciated.

If you plug in just one of those cameras directly to the roboRIO’s USB port (disconnect the other two, as it’s easier to troubleshoot one by one rather than tackling the problem with many variables), can you see an image? How about running the tool: Testing your camera’s compatibility with the NI roboRIO ? Do you see a successful acquisition mode?

More troubleshooting steps can be found in: Robot Camera Images Not Appearing in FRC Dashboard. However, if you cannot see the camera’s image through NI MAX (under the roboRIO located in Remote Devices), and the suggested tool does not provide successful modes that can access the camera; I am afraid the video format that it uses might not be compatible with the driver used in the RIO.

IMO, I think I would try to utilize something like a Raspberry Pi network-connected to the robot radio and just connect all the cameras to that (a number of teams have even posted software solutions for it). You’ll have much better control of your network management this way too.

I’ve never had good luck getting cameras, let alone multiple cameras, to work well when connected to the RoboRIO, you end up having to cut the resolution and framerates to the bare minimum and I generally find it to be an unpleasant experience.

For what it’s worth, we used 4x cameras last year, 2x Limelights each with an additional camera plugged into the USB ports, and we never hit the bandwidth cap (it never even ran below 90/30fps).

Were you streaming all 4 to the dash simultaneously?

Sort of. We didn’t use the “dashboard” per say, we simply opened a web browser and navigated to the stream IP address of each camera (we positioned the browser windows in such a way that you could see all 4 at once). Running cameras through the dashboard comes with a bit of processing overhead, and we didn’t see it as necessary.