|
Re: 2 Cameras in Java
We ran with 3 cameras on our robot this year (front high view, front ball intake, and the reverse-cam). What we did was to extend the CameraServer class to allow us to switch feeds from one cam to another. We found that getting 2 simultaneous feeds put us a bit too close to the bandwidth cap, even at low-ish resolution (mjpeg isn't that efficient).
On our DS we had two buttons that would set the direction of travel forward and pick one of the two forward cams, and a third button that would invert the direction of travel of the robot and bring up the "reverse" cam. It was fairly efficient, and good for intaking a boulder against the rail or in the corners.
Our USB problem wasn't bandwidth (we stopped image capture as we switched cams), but that we had 3 identical cams on the USB bus -- which cam was "usb0" tended to change with each cold start of the RoboRIO. Part of our pre-match on-field setup was defining which "usbX" camera was which.
|