Camera Stream Lost in Sandstorm


#1

At Waterbury, our team experienced lack of camera stream during sandstorm in some matches, while in other matches we did have it. During tele-op we had no issues. We are using 2 Microsoft lifecam’s.

Anyone have this same issue and know any potential fixes or sources? I can link to our github when I am not at work.

In order to reduce bandwidth, we only stream one camera at a time by switching between them.


#2

I’m assuming you’ve lowered your resolution and frame rate? You don’t get a ton of value at anything better than 160x120, and it can be drivable with even just 10 FPS or so.


#3

Akash, did you have a complete “blackout” on the stream for the cameras or did they freeze while in the sandstorm period?


#4

Last I adjusted it I brought the res down

Blackout from the start.


#5

Have not had this issue but we have an old lifecam I can plug in and try to replicate the issue tonight or tomorrow and hopefully can help.


#6

Please share your code. The camera libraries don’t have any internal connection to auto/teleop. Are you using addSwitchedCamera() to do the camera switching? It sounds like you’re at an event–track down your local CSA to help too.


#7

#8

You should use addSwitchedCamera(“switched camera”) instead of getServer() at Robot.java:73. getServer() / addServer() isn’t robust, which is why we added addSwitchedCamera during the season.

You should also call setConnectionStrategy(ConnectionStrategy.kKeepOpen) on both frontCamera and backCamera. This will keep the non-selected camera from automatically disconnecting when the other camera is selected, making switching faster and more reliable.


#9

Thanks @Peter_Johnson we’ll try that out!!