View Full Version : Multiple Cameras on Smart Dashboard
aweso_meme
07-02-2015, 19:06
Hi all,
I'm having trouble with Smart Dashboard. I have 2 USB webcams, yet Smart Dashboard will only display one. I hit view -> add -> USB Camera and only a blank widget appears (it is the same color as the default smart dashboard background color). My code involves everything from Simple Vision example (pretty much copy and paste), but I have also written server.startAutomaticCapture("cam1"); in an attempt to add the second camera. If I right click the second widget mentioned above, there is no option for which camera I would like.
As a FYI, we are running Java for our system.
Does anyone know how to add this second camera to the smart dashboard? Thanks for your time.
RufflesRidge
07-02-2015, 19:26
Does anyone know how to add this second camera to the smart dashboard? Thanks for your time.
Write a whole bunch of custom code. The CameraServer is clearly coded for a single camera. You will have to make significant modifications to the camera server and likely to the USB Camera widget to display two at once.
To display one at a time and choose between them, set the image being sent yourself (see the Intermediate vision example).
aweso_meme
08-02-2015, 08:23
Thanks for your reply. Unfortunately, we do not have very much time to write lots of custom code. We really would like both cameras displaying. Is there any way to do this without the use of smart dashboard/lots of code? is there some elegant code out there? If not, that's all fine and I will do what RufflesRidge suggested.
Thanks all.
EricS-Team180
09-02-2015, 10:07
You could send one stream to the driver station and another to a web browser through another port.
Eric
Be aware, that in previous years at least, there wasn't enough bandwidth in the Field Management System for multiple video streams.
One year I tried increasing our video feed from 320 x 240 to 640 x 480. It hung our robot about 10 seconds into the match because we couldn't get commands to it. Had to back that out quickly.
Two 320 x 240 streams are about half the bandwidth of 640 x 480, but there's still no guarantee that it will work. You don't want to do something that works fine in your shop but utterly fails when you're connected at the competition.
There was a document last year the discussed FMS bandwidth. If/when I have more time I'll look for it.
EricS-Team180
10-02-2015, 09:41
True that!
We had similar experiences.
Here's some good documentation from 2168, that references the FMS and the new hardware for 2015: 2168_beta_test (http://khengineering.github.io/RoboRio/faq/fms/) and here is the white paper that cbf mentions: FMS white paper (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2013/FMSWhitePaper_RevA.pdf)
2168 has this to say about bandwidth:
NI states the new 2015 protocol should only use about 90kbits/sec vs the 900kbits/sec of the 2014 protocol, so this should give more headroom for users wishing to utilize the link bandwidth. This does not change my recommendation. Try to limit all comms between the Robot and DS to 5MB/s max to ensure smooth operations. (sage advice -tho we're pushing it this year :P)
Also, search the various Vision System threads for 2015 (maybe you already have)
I'm not leading our vision system efforts, but I'll volunteer brk (Brian) as a good resource. Feel free to send him a PM...
thanks
Eric
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.