|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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.
|
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
|||
|
|||
|
Re: usb camera name in roborio
Yes. May I ask why this a routine occurrence?
|
|
#5
|
|||
|
|||
|
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 |
|
#6
|
||||
|
||||
|
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? |
|
#7
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|