OCCRA
Go to Post 1. Build a robot. 2. Donít let it get destroyed. - B-Bot [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-17-2015, 07:06 PM
FancyGerald FancyGerald is offline
Registered User
FRC #3098
 
Join Date: Feb 2015
Location: Mi
Posts: 6
FancyGerald is an unknown quantity at this point
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-18-2015, 08:11 AM
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: USB Camera name randomly changing

Are the cameras assigned names in OI?
Reply With Quote
  #3   Spotlight this post!  
Unread 03-10-2015, 12:43 PM
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 122
Crossle86 is an unknown quantity at this point
Re: USB Camera name randomly changing

This issue is a problem for our team as well.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-14-2015, 11:01 AM
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
Re: USB Camera name randomly changing

Any updates on the issue? Have you got it working yet?
Reply With Quote
  #5   Spotlight this post!  
Unread 03-14-2015, 11:26 AM
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 122
Crossle86 is an unknown quantity at this point
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.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-15-2015, 03:37 PM
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 385
fovea1959 will become famous soon enough
Re: USB Camera name randomly changing

would doing a directory listing on /dev and look for the cam* devices be useful?
Reply With Quote
  #7   Spotlight this post!  
Unread 03-16-2015, 03:54 PM
Crossle86's Avatar
Crossle86 Crossle86 is offline
Software Engineer
AKA: Richard Corn
FRC #4450 (Olympia Robotics Federation)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Olympia, WA.
Posts: 122
Crossle86 is an unknown quantity at this point
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-21-2015, 10:35 AM
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 78
legts is an unknown quantity at this point
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
Reply With Quote
  #9   Spotlight this post!  
Unread 03-21-2015, 07:56 PM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA & Software Engineer @ GM
AKA: Jake
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 558
Arhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud ofArhowk has much to be proud of
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:52 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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