Two cameras, really close. Please read.

So, we went off of someone else’s code listed in this pictures, but in teleop instead of periodic tasks. When we run the teleop code with “Rear” or “Front” cameras selected, and push the button (8) it switches between a live feed and an error listed in the “Dashboard Running” image. The button functions perfectly, it is jut we are not getting a second image. I believe that it has something with initializing the image in “Vision Processing.” Please help us.

https://drive.google.com/drive/folders/0B2aaTMmNdQ2hUDZScVhXMWdXdjQ?usp=sharing

  1. Did you “verify camera cable”?
  2. Did it do this only once or every time you reboot your robot?
  3. I might be able to help you a bit more tomorrow.

We have unplugged/replugged the cameras and restarted the robot multiple times if that is what you mean. It does it every single time we select a camera, like I said, the button to switch the cameras works great, but only one displays. Can you maybe take a look at the vision processing code and see if I need to change something to initialize the cameras? I think that might be the problem. Thanks for responding.

I’d try those things next:

  1. Removing the “set size” vi in the while loop.
  2. Setting the white balance, exposure and brightness to custom values.

Hope this works.

Edit: You can take a look at my program (I’m the one that gave you the screenshots) to look if you see other differences. I’m a bit stressed now that my code might not work :deadhorse: (didn’t find a good emoticon to express my feelings)

Edit 2: Are you even sure that your camera works in the first place? What model is it?

Our team was able to fix this by playing with the Camera Set Status VI on both cameras, for some reason setting one to True and he other to False made them work again.
We currently don’t use it anymore because it caused too many issues (changed to 1 camera on a servo) but it might help you.

I made some progress on this. Initial testing was done with two USB cameras from different vendors. Retesting with two MS Lifecams, the results were very strange.

If either camera is set to HW compression, the second will fail. If both are set to SW compression, you can get both cameras to work provided the settings are “different enough”. The vision driver guys looked into this and the internal error returned by IMAQdx is mapped from the out-of-memory or out-of-bandwidth error. It turns out that some vendors ship drivers that do not estimate the bandwidth very well and based on those estimates, the second camera is deemed to overrun the quota. Very strange, but if you fiddle with the settings, you can get the second camera to work.

Or you can substitute a camera from a different vendor. Note that I saw this a bit even with a Logitech and MS camera being used together. Some of the same steps were necessary as a workaround. It may be possible to enable some quirk workarounds for these cameras, and these tend to make their way into the driver over time.

Greg McKaskle

Thanks for the response. Sorry I did not get back sooner. That camera does work, and it is brand new. I will try the those suggestions next chance I get. Thanks.

The best way to check if the RIO is seeing the camera is to ssh into the RIO, and look in /dev/. You should see video0 and video1 if you have 2 cameras plugged in. If not, check if your RIO USB port is damaged or if there is some really strange firmware issue.

We got it to work, it was a lot simpler that I thought. I will be able to post a screenshot sometime over the summer, I am not at our shop at the moment, but I will sometime this next month and be able to access our 2017 program.