USB Cameras

Hello All,

With the new RoboRio having USB ports, does this mean we can attach any USB 2.0 camera to the RoboRio, and then use the default code provided from the examples in Eclipse (Java) to display the image from the camera on the screen of the drivers station, and continuously update? Or do we need a specific type of camera?

Thanks.

All USB cameras haven’t been tested so I can only speak for the ones we did test. They worked through default LabVIEW by just plugging them in and enabling on the Dashboard.
We tested two models:

  • Microsoft Lifecam HD3000
    *]Logitech HD Pro Webcam C920 (just what was in Target or Best Buy)

I tested a number of others from Logitech and Microsoft. I also tested a dual camera 3D camera, and while awkward to use, it worked also. The myRIO has been out for about a year, and you may be able to find some people who list cameras that work, don’t work or need additional packages installed to work.

Greg McKaskle

How are these cameras powered? Is it just through the USB? Does anyone know if USB cameras cause a lot of work for the roboRIO over network cameras? I am especially asking about the Lifecam.

They just require the USB cable, one wire. All power comes through that.

For streaming video to the laptop a USB camera is more work for the roboRIO over an IP camera like the Axis, because the Axis IP camera serves images directly to the PC, while the USB video stream goes right into the roboRIO and the user has to have code to then forward the images to the PC. That extra stop adds about a tenth of a second lag.

For processing on the roboRIO the IP and USB cameras are about equal. The USB connection makes wiring easier.

Greetings!

Here is code that runs dual USB cameras. It’s in the form of a C++ Eclipse project. It should be extensible to multiple (more than 2) cameras. The process is a bit convoluted because the WPILib objects hardcode themselves to camera 0. So, you’ve got to completely shut down camera 0 before enabling camera 1 and vice versa. Sorry that it’s a bit light on comments. But, we always try to write self-documenting code :wink: . If you’ve got any questions, feel free to contact me via PM and I’ll try to answer them.

You can find the code in thread: http://www.chiefdelphi.com/forums/showthread.php?t=133939

HTH,

Mike