Robot Camera Stream

Our team is attaching a camera on our robot and planning to stream the data to our dashboard to help our drivers. However, everything we have tried has had too high of latency. What is the best software for video streaming? What is your team using?

We are using a pi and Logitech camera attached to it via USB.

We have tried: HTTP (too slow) Websockets (too slow) GStreamer (too slow) PhotonVision (works quite well, but it’s meant for detecting AprilTags/Reflective tape, not streaming data)

One of my comments in the thread for “How to ask questions” is don’t give make a qualitative comment about a quantitative issue. I, for example, can’t image what number you think is too slow about PhotonVision’s driver mode especially after you say it works well (which I agree with you and with almost no effort to use).

Similarly WPILibPi works well with a tiny bit more coding that it comes with and you can change and you get a huge amount of flexibility for specifying camera parameters.

And the same basic functionality works just as well on our roboRIO with no added complications of extra computing device with its power wiring and Ethernet wiring resulting in more weight and things to go wrong.

I’m glad you got your Logitech camera to work. Mine never starts right and has to be unplugged and re-plugged each time which means it can’t be used in competition. What model are you using successfully? ty

As the previous poster said, you have not defined what you are seeing and what is “too slow”.

The reality is that any USB camera will have significant latency, and any network solution will add to that. I think in a good setup (for FRC), the net latency to stream to the DS comes in around 100ms (but is very hard to measure). If you are coming from a drone flying world, they use very different technology and cameras to get lower latency.

As for PhotonVision, that can stream to the DS just as well as any solution. Switch the camera to “Driver Mode” and it removes any of the image processing and streams it as fast as it is able. Of course, you then won’t get any AprilTag info. You can put 2+ cameras into PV, and use each for different purposes.

We are using Logitech C922 Pro HD plugged into a pi.

Apologies for the unclear question. We are looking for a solution with less than 200 ms of latency and currently all our current solutions (except photon) have over 1s of latency and are quite unstable. I think we are going to go with PhotonVision on “Driver Mode”. Thanks for the help and suggestions!

Thanks for the number - I see your concern immediately.

I downloaded a 1/100 second clock from clocks .

I run the clock movie on my DriverStation laptop and point a camera at it. Display the stream from the various servers in ShuffleBoard, browser, VLC media player, etc.

Depending on the camera I fairly consistently see 80ms - 180ms difference between the clock on the laptop screen and the display of the servers’ streams through browser, VLC, or ShuffleBoard. Print Screen (WindowsKey+Shift+S key combo) freezes the display for your analysis.

Maybe this idea can help you track down where the problem lays.

EDIT Fixed incorrect lag times. I’m taking STUPID drugs for covid and typed lag speed off by about a factor of 6 . I’m so sorry; I see why they say don’t operate machinery; I’m not even safe to operate a laptop in bed.

1 Like

Interesting idea, thanks

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.