Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   usb camera name in roborio (http://www.chiefdelphi.com/forums/showthread.php?t=134660)

rod@3711 02-15-2015 08:44 PM

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.

FleventyFive 02-15-2015 09:43 PM

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.

rod@3711 02-15-2015 10:10 PM

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?

RufflesRidge 02-15-2015 10:15 PM

Re: usb camera name in roborio
 
Quote:

Originally Posted by rod@3711 (Post 1444753)
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?

rod@3711 02-16-2015 12:04 AM

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

Crossle86 03-10-2015 01:40 PM

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?

EmileH 03-13-2015 06:44 PM

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.


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

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