FRC2706 / 2017-2706-Robot-Code

The main robot code for our 2017 Steamworks robot.
3 stars 3 forks source link

Switchable camera feed #64

Open kevlam2706 opened 7 years ago

kevlam2706 commented 7 years ago

Create a single video stream back to the Driver Station and dynamically select which camera feed goes to it. This should reduce the total streaming bandwidth over the FMS. The rear camera should be shown when the climber commands are activated.

The original plan was to use code verbatim from Chief Delphi:

https://www.chiefdelphi.com/forums/showthread.php?t=143688

I could not get this to work without crashing the Rio.

ounsworth commented 7 years ago

Thanks @greyingjay. Just for completeness, can you include here what the current workaround is? Streaming both videos at the same time? How?

kevlam2706 commented 7 years ago

The current workaround is to just run both camera feeds at low resolution to the driver station.

UsbCamera forwardCamera = CameraServer.getInstance().startAutomaticCapture(0);
UsbCamera rearCamera = CameraServer.getInstance().startAutomaticCapture(1);

You can select one camera on the left side of the dashboard and select the other camera on the right side. Both stream at 160x120 and the bandwidth seems low.