This document will provide you with the tools to test the camera modes which your camera can operate when plugged to the NI roboRIO. We also provide the results we got for the most common cameras used in FRC. It will let you know which configurations have been proven to work, so you can use them as a reference for your setup.
Why do some cameras do not work with the roboRIO? Why can I sometimes use my camera with the roboRIO but if I change the settings, I stop getting an image? The NI roboRIO runs a Linux Real-Time (RT) distribution. Therefore, the devices connected to its USB ports should be compatible with the video drivers that are loaded with this Operating System. In other words, the camera’s configuration must return something that the Linux RT understands.
Hardware and Software Requirements
LabVIEW for FRC 2019
FRC Update Suite 2019
Steps to Implement or Execute Code
Download and open the attached code: 2019 Robot Camera Test.lvproj
In the project, right click the roboRIO target and select Properties. Figure 1: LabVIEW’s Project Explorer
Change the IP Address / DNS Name so it is configured for your team. If you are connected by USB to the roboRIO, you can also use the IP address 172.22.11.2. Otherwise, replace the string with roboRIO-XXXX-FRC.local, where XXXX is your team number.
Open Camera Test.vi Figure 2: Camera Test’s Front Panel
Plug camera(s) into the controller or computer.
If you want to save results to a spreadsheet file, set the path to a good location on the target. For more information about saving files in the roboRIO, please visit: Working with File Paths on Real-Time Targets for NI Linux Real-Time.
Run the VI.
You will get a table with both the failed and successful modes of every connected camera to the roboRIO. We recommend you avoid using the modes (configuration of image size and fps) that fail the test and give preference to those who have proven to be working with the roboRIO.
Figure 3: Camera Test’s Front Panel showing the results tables.
What is the difference between the YUY, JPEG, and other video modes?
When using YUY you are sending the raw data from the camera to the roboRIO. This means you are using the NI’s image compression on board the roboRIO’s processor (which you can change using the dashboard’s setting or the Vision VIs).Figure 4: LabVIEW Dashboard showing the camera’s compression setting
Figure 5: Vision.vi from a LabVIEW roboRIO Project Template highlighting the Compression setting
When using JPEG or other compression, the camera is performing the image compression and sending the processed data back to the roboRIO, which just forwards it to the network for it to be fetched from the Dashboard.
How is this useful to me?
By knowing which video modes do not work in your camera, you can avoid selecting those combinations and prevent your video from not showing during the competition. NI recommends selecting those modes who have proven not to have problems with the roboRIO’s vision driver for higher reliability in the field.
Also attached is a file with the modes we have tested that fail in some common cameras.
HD Pro Webcam C920
HD Webcam C615
Microsoft LifeCam HD-3000
89.4 % failed
0.5 % failed
17.5 % failed
11.1 % failed
1.0 % failed
Licenses and Additional Resources
Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense