Camera Only Works after Restarting Robot Code?

Heyo Everyone,

First off, this is my first post on Chief Delphi so I apologize if there is a specific format I should be following.

Next, the problem. We are currently running default labview vision code. We can get the camera to appear on the drop down list on the dashboard, but when we select it, it ether says no camera selected or gives an error message.

A temporary fix we found was after connecting to the robot, we use the dashboard to restart robot code. Then when we select the camera, everything works fine. While this works for the time being, it is a hassle to wait for the code to restart, and we don’t want to have to restart the robot code at competitions.

I was wondering if anyone else was having a similar problem or found a fix. I believe it has something to do with the code starting before the roborio recognizes the cameras, but I could easily be wrong.

Are you using a usb or ethernet camera?

USB

A fix for this will be distributed in the team update this week.

Excellent. There were at least half a dozen teams at Palmetto having this kind of flaky behavior.

We had this problem at Waterbury. Our workaround was to turn on the robot early and redeploy the code before every match, so the camera would work.

The cause of the problem appears to be related to how long the roboRIO OS takes to decide what its IP address is. If the camera server starts up before everything is settled, it publishes an address that the Dashboard can’t use.

The official fix is in two parts. The first is a change to the camera server that keeps it from putting out the unusable address, and adds a numeric address. The second is a change to the Dashboard that lets it try the additional numeric address if it can’t find the video stream at the published name.

Restarting the robot code after communication is established is an effective workaround.