![]() |
More Than Two USB Cameras??
Hello FRC programming community,
I am the lead programmer on team 5854, this is the team's second year and my first as lead programmer. I am using usb cameras to get images to my vision system. I have two cameras hooked up to the usb slots on the roborio and I am using a custom class I made using the built in CameraServer library. (Code Example below) I was wondering if there is a way to make a third camera streaming service. Or if there would be a problem using a usb splitter because I'm not sure how the rio will handle it. Thnak you in advance. And sorry if the text is confusing or misspelled, I'm dyslexic. Code on how I'm making the camera server: Code:
usbCamera = new UsbCamera("USB Camera 0", cameraId); |
Re: More Than Two USB Cameras??
Using more than two cameras is certainly possibly. Don't use a "USB Splitter", instead just simply use a USB hub on the robot. It may get a little funky with too many because of current draw. Once plugged in, they should simply show up on the roboRIO dashboard, and you should be able to create another CameraServer class.
|
Re: More Than Two USB Cameras??
We've used 3 HD-3000's. You have to be careful with the resolution and fps, because you can run into USB bandwidth issues.
|
Re: More Than Two USB Cameras??
I highly recommend using something along these lines to make sure that you are only ever streaming the camera you want, instead of wasting bandwidth by streaming multiple cameras at the same time.
Code:
public void robotInit() { |
Re: More Than Two USB Cameras??
Quote:
EDIT: We just tried a new robot program with just this code and got it to work. If anyone else has this error, we had to change the source in smartdashboard to "switcher," then RESTART the smartdashboard and the robot, and then it would work. I think the problem was that since the smartdashboard had started off streaming the usb cam 0, it never stopped streaming after switching sources. |
Re: More Than Two USB Cameras??
Quote:
|
Re: More Than Two USB Cameras??
Quote:
|
| All times are GMT -5. The time now is 22:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi