RobotCasserole1736 / RobotCasserole2020

Software for Robot Casserole's 2020 FIRST Infinite Recharge competition season
MIT License
1 stars 0 forks source link

Get Raspberry Pi set up for Driver Cameras #9

Closed gerth2 closed 4 years ago

gerth2 commented 4 years ago

Set up a raspberry Pi to broadcast 2 USB cameras as mjpg streams, per the instructions here: https://docs.wpilib.org/en/latest/docs/software/vision-processing/raspberry-pi/index.html

Add code to the robot to display both camera streams on the driver webcams page (robot website). Should involve two calls to the addWebcam function for driver view widgets

See if we can get two PS3 EYE cameras running at max framerate (hopefully lowest latency?) broadcasting to the driver station. Verify we can do this with under 3MBPS data transfer.

If not: Try with just one camera. Turn down settings until 1 camera streams at 3 MBPS. Then, add the ability to do camera stream switching from the raspberry PI.

Add code in the robot to create a key in NetworkTables and write to it. Add configuration on the Raspberry pi to read this value and switch camera feeds based on it. There's some info at the bottom of this page : https://docs.wpilib.org/en/latest/docs/software/vision-processing/raspberry-pi/the-raspberry-pi-frc-console.html

Additionally, the source code for the default stream app is here:https://github.com/wpilibsuite/FRCVision-pi-gen/blob/frcvision/deps/tools/multiCameraServer/src/multiCameraServer.cpp . As far as I can tell, this is the only documentation of the JSON config format required to do this?

schmizr19 commented 4 years ago

This is Aden. Done. Probably would be beneficial to test with 2 cameras and with the actual cameras we are going to use.