Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Switching between two cameras (http://www.chiefdelphi.com/forums/showthread.php?t=145550)

Potatoes 11-03-2016 00:25

Switching between two cameras
 
We currently have one camera working on the robot, and it streams to the dashboard totally fine. However, we want to add another camera.

What I want to know is, where in the dashboard code do we decide which USB port it reads from? We want to be able to switch between each camera during the game (we have one for shooting and one for driving, since we shoot out the side).

yonip 11-03-2016 06:56

I don't know how you initialize your cameras in code, but if you use the camera name ("cam0", "cam1" etc.) you can find the names of the cameras that are connected to the rio through the rio webdashboard thing (open a silverlight-capable browser to "roborio-TEAM-frc.local" as per https://wpilib.screenstepslive.com/s...o-webdashboard )
I haven't tested what port each name corresponds to, so I can't help you there. On our team we just cycle throught our cameras until we find the one we want.
Also of note: you can connect to more than two cameras by using a usb hub.

Greg McKaskle 11-03-2016 07:44

Re: Switching between two cameras
 
The DB talks to the roboRIO and it is the roboRIO that needs to know the USB name. The DB doesn't really know where the images are from.

I think what you want to do is to have the DB write to a selector such as a network table variable. On the robot, use the selector to decide which camera you read from and send to the DB.

The VI that implements this is a few layers down and is in a VI called Send 2 PC.

There are specifics in other posts on CD. I can go into more detail here, but you can probably find it there.

Greg McKaskle


All times are GMT -5. The time now is 03:48.

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