View Single Post
  #5   Spotlight this post!  
Unread 24-02-2016, 09:06
onenerdyguy onenerdyguy is offline
Registered User
FRC #5929
 
Join Date: Jan 2016
Location: Lake Park, MN
Posts: 48
onenerdyguy is on a distinguished road
Re: Urgent- Python USB Camera not working

Quote:
Originally Posted by razar51 View Post
You might check that the roborio didn't give your camera a different name. The default name for the camera that the code you have there assumes is 'cam0'.

Last year we had an issue where, when testing different cameras, the roborio would increment the number of the name given to the camera (cam1, cam2, etc.)

We solved this by doing something similar to the following and then using the default dashboard set to HW capture:

Code:
       camera = wpilib.USBCamera(b'cam1')
       server = wpilib.CameraServer.getInstance()
       server.startAutomaticCapture(camera)
You can find the name the roborio gave to your camera by having it plugged in and then using the USB interface to connect to the roborio in a web browser (172.22.11.2). It should list the names of the devices connected to it,
Also, this fixed our issue with getting it to work, but then the lag came in. We'll figure it out!
Reply With Quote