Go to Post Glitter… lots of glitter. - Andrew Schreiber [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 11-03-2016, 00:25
Potatoes's Avatar
Potatoes Potatoes is offline
Registered User
AKA: Eric Wittmann
FRC #5136 (Mecha Pirates)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Santa Ynez, CA
Posts: 17
Potatoes is an unknown quantity at this point
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).
Reply With Quote
  #2   Spotlight this post!  
Unread 11-03-2016, 06:56
yonip yonip is offline
Registered User
FRC #0449 (The Blair Robot Project)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2014
Location: Silver Spring, MD
Posts: 24
yonip is an unknown quantity at this point
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.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-03-2016, 07:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
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 03:49.

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