Hey CP
During our last district event we tried to operate 2 cameras on our robot. In our school and in the pit both worked perfect, but when we were connected through the FMS suddenly both did not work.
Furthermore, when we try to shoot pictures bigger than 120X160, one of our cameras does not work (error – 1074360319).
It is a problem common for every team which uses 2 cameras through the RoboRio with “Labview”.
I would love to know if you ever encountered this problem/know how to fix it.
Thanks in advance, and good luck with the rest of the season!
We don’t use LV, and I’m not even familiar with the specific numbers on Java, but…
FMS limits the bandwidth for communication between the robot and the FMS switch (7Mb/s per R65-b). We have found that in order to get a decent frame rate, we can only stream one camera at a time, at a fairly low resolution. Last year, we used both a forward and reverse camera, but we did not stream both at the same time, but had a UI control to switch between them.
We have also had targeting cameras (last year it was a third camera) with a higher resolution, but we process that feed onboard the robot and only pass the “target solution” to the network.
We are using two cameras to the SmartDashboard. The resolution is something like 420x320 with a framerate of 15 fps or less with compression. I think I measured each stream at 1.5 Mbps, so we’re using about half of our allotted bandwidth for this.
So… Your resolution seems small enough, but I’d check your frame rate and make sure you have some sort of compression going on. I’m assuming that you’re using the RoboRio to serve these and so should be using a port for which traffic is allowed.
You might be interested in this recent thread on LabVIEW and cameras:
If it’s not necessary to be stremaming both at the same time it would make sense to only stream one at a time. It is possible to have a toggle switch that switches between the cameras.
I was one of the CSAs helping your programmers try to get 2 cameras working at ISR 1. After a good amount of time spent sifting through the WPI camera VIs, the bottom line is that the current camera drivers in the LabVIEW WPI Lib will not stream 2 USB cameras at once. As I see it, your options are either to write your own libraries for multiple USB streaming or use a co-processor to take the image from the USB cameras and send it back to the DS. I will be at ISR 4 and can try to help more in person if you haven’t figured out a solution by then.
Assuming that this statement from the OP is accurate
…In our school and in the pit both worked perfect, but when we were connected through the FMS suddenly both did not work…
then I don’t see how the drivers could not support streaming two cameras at once. Perhaps they don’t support it on IP ports allowed by the field network. Perhaps they don’t support it in FMS mode, but if it works on a private network, then the drivers appear to support it.
I was working with them to get two USB cameras working. When I left them, they had decided that it was not going to work because the camera drivers threw exceptions when you have two Send Image to PC loops running. If they figured out a way to get the built-in driver working with two cameras, then ignore my statement.