Guidance For Approach To Feed Video Stream From Raspberry Pi With HD3000 To Dashboard

Has anyone tried sending MJPG video from a Raspberry Pi to the Dashboard?

We are developing our robot to use a single USB HD3000 camera. The camera is connected to a Raspberry Pi running Python along with OpenCV support. Our thought is to send the camera frame data to both our image processing logic and the dashboard. We can send it through the Roborio but it appears we would have to modify the Camera Server code somewhat. We were planning on connecting the Pi to a the on board Ethernet, so we had another thought to pipe it to the dashboard directly. Thank you in advance for your thoughts.

You can modify the dashboard code to point to the Pi instead of the RoboRIO (not sure what language you’re using). You’ll need to have the Pi transmit the images as the driverstation is expecting.

The dashboard is expecting to read a 4 byte value coresponding to the length of the image and then received a JPG which is that value in length. Alternatively you could write your own receiver.

Thank you for your reply. We were definitely considering this approach… Our native code on the Robot is Java. We are using the Smart Dashboard. Any thoughts how to modify Dashboard code?

Unfortunately I don’t use Java (LabView team). At worst, you could open a port in Java to connect to the Pi and display the image in a popup window. If you post a copy of the stock default Java dashboard I may be able to find the setting.

I’d love to learn more about this! Any updates or tutorial suggestions for pi and JAVA communication? We are new to JAVA this year (Iterative but considering Command Base). We have a pi and HD3000 but don’t yet know how to stream a video to the Java dashboard.

There is a plugin available for the SmartDashboard. Put the jar folder in the C:\Users[USER]\SmartDashboard\extensions folder (on Windows). You should be able to add the extension and edit its properties such as the IP address and port number.

MJPGStream_SDExtension.zip (5.34 KB)


MJPGStream_SDExtension.zip (5.34 KB)