FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

FRC 2017 USB Camera not working with LABView

Right out of the box with 2017 LABView software, I cannot get the USB camera to work.  We have used a USB camera for the last 2 years with no problems.  We are developing with LABView.  The example LABView vision code does not work either.

The dashboard does not show any "USB" options in the camera dropdown.

Has anyone else had problems with getting USB camera to work with LABView?

0 Kudos
Message 1 of 20
(10,273 Views)

PS. We have installed the Labview update...

0 Kudos
Message 2 of 20
(10,245 Views)

My team is having problems with Labview USB camera's as well.  I have uninstalled all versions of Labview and reinstalled with new version and ran updates.  Our vision setup is Microsoft Life webcam connected directly to laptop and just running vision example.  We get a mask however, we're not getting a high enough score to get distance and a green box.  We tried using a different webcam (Logitech) and it too was in the 30s score wise.  Used the webcam on laptop and got a better score in the 50s but still no distance readings or green box.  I've lowered the settings for score with no effect.  We've changed camera settings on example code with no effect either.  The example pictures from file work just fine, we do get distance and a green box which is telling me our camera is the issue.  We are now thinking of using a IP camera.

0 Kudos
Message 3 of 20
(10,235 Views)

Efiegl, Did you get your camera working?

Do you have your camera connected to the roboRIO? If so, you have to "Enable Vision" in the robot main. To get this to say enabled, make sure you have Enable Vision control set with the green light lit, then right click it and go to Data Operations > Make Current Value Default. This will make sure that vision is always enabled. 

Let me know if that helps.

Ryan

0 Kudos
Message 4 of 20
(10,205 Views)

Hi swheeler90,

What does the target look like that you are using? I created a scaled down version of the boiler (only 2.9 in diamater) to use for testing. Make sure you have a light or can "see" the target enough to filter it out from the background. Then from there you should be able to use it just like the real thing. 

I will be doing a demo and will talk about my target and some troubleshooting tips tonight if you want to join in. I will be live from 5-7pm central time https://techjoynt.zoom.us/j/4053455010

Let me know if you get yours working. 

Ryan

0 Kudos
Message 5 of 20
(10,204 Views)

Actually, we are not even using targeting, so we don't have vision enabled.  We are only trying to see the video stream from the camera on the Dashboard.

0 Kudos
Message 6 of 20
(10,170 Views)

Ok.. so you want to use a camera attached to the driver station and display that on the dashboard?

If you want to see a camera on the robot you need to have "Enable Vision" set to true to allow the stream to the driver station.

 

What camera are you using?

Ryan

0 Kudos
Message 7 of 20
(10,165 Views)

Ok, so I am experimenting with a dual usb vision option right now and remembered your question. 

Check your Vision processing loop to make sure your USB camera is addressd correctly. 

With the "Enable Vision" button off or disabled in the Robot Main.vi I was able to stream 2 USB Cameras to the dashboard. 

Here is a screen shot of my Vision Processing.vi and the Robot Main.vi so you can see what I had set.

For a single camera you can use either USB port and still use "USB 0". From what I can tell the First camera pluged in will get USB 0 and the second camera will get USB 1. And they should stay that way unless you unplug either of them when the power is on. 

I hope this helps. 

Ryan

 

Download All
0 Kudos
Message 8 of 20
(10,139 Views)

Hi Ryan, 

Can you give a little more detail about how to display 2 USB camera images in Dashboard ?  I repeated the VI shown in your attached files.  In Dashboard, I can only see show either the camera 0's image or camera 1's image at Camera tab, not both camera 0 and camera 1 at the same time.

 

Did you change anything in Dashboard? Any other changes in vision processing.vi like port number or camera 1's IP address etc ? 

 

Thanks!

Jun

Team Tech Tiger

0 Kudos
Message 9 of 20
(9,940 Views)

I was having issues getting the Dashboard to display the camera feed intermittantly using a USB camera. I found the below worked for enumerating the camera and getting video:

1. Run roboRIO code

2. Open Driver Station and Dashboard

3. If 'No Camera Selected' was the only option or selecting 'Camera' did not work, reboot the roboRIO with Reset button only (but not the robot's WiFi Router)

4. Allow roboRIO to reconnect, camera would reinitialize and we could get video

 

@efiegl , you may want to add an Image Display Control to the Vision Processing VIs front panel and run the code from the LabVIEW project. This will allow you to see if you are getting any images at all!

 

Display an Image

http://zone.ni.com/reference/en-XX/help/370281P-01/nivisionlvbasics/display_an_image/

Message 10 of 20
(9,903 Views)