Go to Post Great people like you both [Scott and Libby Ritchie] make the FIRST community even better! - tiffany34990 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 15-02-2015, 20:44
Happy Birthday! rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
usb camera name in roborio

We are having a bunch of issues with the usb hd-3000 camera. We actually got it to work using either the default dashboard and the smartdashboard, then it won't work, then it did work, and now it does not. The inconsistency is driving us nuts.

When using webdashboard to view devices, it will name the camera cam2. If we move usb cable to other port, then it is named cam1. How do we get it to be named cam0?

I think this has been some of our issues. We have 2 camera and 2 roborio and it seems like every time we swap a camera or usb port to test something, we only get in worse trouble.
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2015, 21:43
FleventyFive FleventyFive is offline
Registered User
FRC #4118
 
Join Date: Sep 2014
Location: Gainesville, FL
Posts: 23
FleventyFive is on a distinguished road
Re: usb camera name in roborio

Why do you need it to be called cam0? In your code, just name it cam1 or cam2 or whatever the webdashboard tells you.
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2015, 22:10
Happy Birthday! rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
Re: usb camera name in roborio

So everytime we swap cameras or connect the camera to the other usb, we have to change the program?
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2015, 22:15
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: usb camera name in roborio

Quote:
Originally Posted by rod@3711 View Post
So everytime we swap cameras or connect the camera to the other usb, we have to change the program?
Yes. May I ask why this a routine occurrence?
Reply With Quote
  #5   Spotlight this post!  
Unread 16-02-2015, 00:04
Happy Birthday! rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
Re: usb camera name in roborio

I do not expect it to be a routine occurrence afterbag and tag. But some how we have one roborio that calls a camera in one usb port cam1 and cam2 in the other. Then a clone roborio call them cam0 and cam1. How we got there was due to swapping usb ports, cameras etc and most likely a lot of stupidity. Since we have to declare the camera name in StartAutomaticCapture("cam0") we need different code in our clone roborio.

Anyway, now that we are more familiar with how the usb camera gets named, we will move on to the next crisis, thanx
Reply With Quote
  #6   Spotlight this post!  
Unread 10-03-2015, 13:40
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: 92
Crossle86 is an unknown quantity at this point
Re: usb camera name in roborio

This is a problem for our team as well. We have two robots with two RR but we run the same code for both...but the camera names vary between the two robots. This seems to be a legacy of using the same camera on both RR along the way. One RR has two cameras which it named cam0 and cam3. Don't know why cam3 instead of cam1 or cam2. The second RR had one of those cameras plugged into it at one time and now we have a new camera for use with the second RR, which it named cam2. This scheme seems problematic if you want to run the same code on both RR as the robots are clones.

Can anyone state the scheme for camera name assignment so we can understand what is going on and is there a way to control the name assigned to cameras or rename it?
Reply With Quote
  #7   Spotlight this post!  
Unread 13-03-2015, 18:44
EmileH's Avatar
EmileH EmileH is online now
it's not a water game, ok?
AKA: Emile Hamwey
FRC #1058 (PVC Pirates) & SLFF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 532
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: usb camera name in roborio

What you theoretically should be able to do is do a SendableChooser (sort of like an autonomous chooser) in the robotInit for each camera, ie cam0,1,2,3,4 and write an if statement that sets the boolean for each camera name true or false. Just remember to set the right camera name before the robot connects to your laptop.

The autonomous chooser on screensteps is here

hope this helps.
__________________
2016-present: High School Student, FRC 1058 PVC Pirates
2016: RiverRage 20 Champions, Battle of the Bay 3 Champions

2013-2015: Middle School Student, FRC 3467 Windham Windup
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 14:01.

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


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