Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   USB Camera name randomly changing (http://www.chiefdelphi.com/forums/showthread.php?t=134799)

FancyGerald 17-02-2015 20:06

USB Camera name randomly changing
 
My team has plans to use two different USB cameras both plug into the same robo-rio. When we started to the use cameras we were working with only one, and that camera was give the name "cam0". we had written code to use "cam0", then we started to have issues because the name of the camera had changed to "cam1". so we wrote code to handle the seemingly random name changes for the camera. now that we have started to toy with two cameras the bot has now given the new camera the name of "cam2". but not only has it given it the name of "cam2" it only names it that way if its plugged into the port closes to the edge. why aren't the names consistent and if there is how could I change the names of the cameras?

legts 18-02-2015 09:11

Re: USB Camera name randomly changing
 
Are the cameras assigned names in OI?

Crossle86 10-03-2015 13:43

Re: USB Camera name randomly changing
 
This issue is a problem for our team as well.

legts 14-03-2015 12:01

Re: USB Camera name randomly changing
 
Any updates on the issue? Have you got it working yet?

Crossle86 14-03-2015 12:26

Re: USB Camera name randomly changing
 
Sorry I havent updated this been wall to building. We opted for a properties file on rio which identifies which rio and thereby which camera names are available. Works fine and the properties file can be used for other configuration data if the need arises.

fovea1959 15-03-2015 16:37

Re: USB Camera name randomly changing
 
would doing a directory listing on /dev and look for the cam* devices be useful?

Crossle86 16-03-2015 16:54

Re: USB Camera name randomly changing
 
That sounds good but a look at /dev shows no cam* devices even though we know cam1 exists as a usb device on the rio usb port.

legts 21-03-2015 11:35

Re: USB Camera name randomly changing
 
Have you gotten the camera names from the roboRIO? Go to roboRIO-xxxx.local while connected directly to your roboRIO where xxxx is your team number. The cameras each get their own names assigned to them by the RIO. Plug in both the cameras and it should show the names of the cameras. Use those names in Robot.java to run the cameras

Arhowk 21-03-2015 20:56

Re: USB Camera name randomly changing
 
I had this issue with a team; the only thing that worked was reflashing the cRIO to change the camera back to cam0. I agree though its really annoying and should be configurable.


All times are GMT -5. The time now is 10:49.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi