We have been struggling with the camera stream to SmartDashboard.
General info about our setup:
In all situations the camera is an Axis M206, reset and configured through the FRC Camera setup application.
In all situations where I believed the camera should have been working, I could ping the camera, access the settings at 10.16.75.11 in a browser, and anonymous viewing was enabled.
In all situations we are using a cRIO-FRCII with the camera running through our DAP-1522 bridge.
In all situations we are attempting to stream through a Camera widget on the SmartDashboard pointing at 10.16.75.11
We had it working at Pittsburgh but ditched it because it was lagging the DS (assuming now that it was due to FPS being 30). I’ll run through everything I can remember we’ve done to it.
We streamed at the default resolution at the default compression and FPS for one or two matches.
The next match the camera lagged the entire driver station. We also had a mixup at this point where we hooked up the driver station in the wrong station and had to switch, but we don’t think this affected anything.
We experimented in the pit with resolution and compression. Even at lowest resolution and 100% compression we were lagging the DS (dropped packets, high latency). Didn’t think to alter the FPS. After this we ditched the camera streaming for the rest of the competition.
We ended up crashing onto our camera in the quarterfinals. We nabbed another M206 from a friendly team in Milwaukee because our old camera doesn’t seem to reset itself correctly. Anyway, the new one was reset and set up the same exact way as the old one. However, now I cannot get a stream with default settings or lower.
TL;DR:
Camera imaged correctly and accessible through ping and browser
Anonymous viewing turned on for SmartDashboard
Using cRIO-FRCII and camera connected through bridge
Camera not streaming to SmartDashboard Camera widget configured to read from 10.16.75.11
EDIT: Upon turning everything on this morning, it miraculously decided to work again… sigh. I did try restarting everything on Thursday but I guess it working again is a good thing.
EDIT 2: After changing the FPS settings and power cycling, the stream is not going to the SmartDashboard again although we can go to it in a browser and ping it. It also worked one time yesterday before failing. Back to square 1! We’re checking to see if it works at least once more with a full shutdown and reset of everything again.
**EDIT 3: We’ve determined that the cause of not working is changing the FPS setting of the M206. If the setting is anything except “Unlimited” or 30 (from the range of 10 to 30) the stream refuses to go through to the SmartDashboard. ** Does anyone have any ideas on how to lower the FPS while still being able to stream to SmartDashboard?
I spent some time with a team at the Boilermaker Regional trying to figure out why they weren’t getting the camera image reliably on their SmartDashboard. This might just be voodoo, but it seemed to help if they stopped and restarted the dashboard after powering on the robot and waiting for communication to be established. It still took between 15 and 30 seconds for the video to start displaying.
We did notice that it took a while to start streaming sometimes while isolating the FPS option problem today. Sadly at FPSes that were not 30 the stream did not start in a span of 5 minutes or so, maybe more.
Our driver station didn’t seem to be lagging with the stream up today though (although we only have our shooter withheld). Maybe it will behave better for WI if we can’t figure out this issue
We are having similar issues with a M1011 camera and have a similar setup as described by BigJ, except set up camera via the camera’s web page. (Basics: 10.te.am.11 in a browser, anonymous viewing enabled, SmartDashboard pointing at 10.te.am.11.)
I can view the camera feed by connecting wirelessly to DAP-1522 and pointing a browser at 10.te.am.11.
Camera is set to 10 fps and appears to be consuming considerable resources. We received watchdog errors and sluggish behavior w/ the camera connected and the performance issues go away when we disconnect the camera by disconnecting the Ethernet cable between the bridge and the camera. With the camera connected, reply times to pings to the cRio are remarkably long (~2sec.)
I will try setting the fps to 30 as was tried by folks here jus to see if it will display at all, but was trying to reduce the amount of network bandwidth taken up by the camera.
Has anyone experienced this behavior and have ideas on how to address it?
Let me say up front that we didn’t use the Smart Dashboard, but rather a custom Labview Dashboard, so not sure if our experience is applicable.
The first question is what are you using for you driver station. If it’s the classmate, I would suggest trying replacing it with a better laptop. When we first tried streaming video to a classmate years ago we quickly discovered that it was overwhelmed trying to keep up. If fact we found that to solve our lag issues back then, we needed to do the opposite of what you’d think. With a lower frame rate, the classmate can get all the frames, but can’t actually decode and render them. So latency went up, and the CPU was maxed out. Highest resolution, no compression, highest framerate, and poof, the classmate would throw the packets away but the ones it got it could render. Swapping the classmate out will eliminate the processing bottleneck, and should allow you to change the network settings.
We have a Lenovo laptop, and steam from the camera a gray scale image @ 30 fps, and see no lag. Our tracking is using luminescence so no color needed. Are you using motionJpeg compression, H.624, ?
If the smart dashboard is bypassing the cRIO when accessing the camera, then it’s hard to imagine how it would cause an issue with the cRIO. For us, there is no code on our cRIO that has anything to do with the camera. The camera is accessed by the driver station and completely bypasses the cRIO.
The driver station can be overwhelmed, run the task manager and see what is happening when it’s connecting to the camera. Can you access it via a browser from the driver station? with no noticeable lag?
Now there is another way to run things, where you let the cRIO capture the camera data, and send it out. But then you’d be connecting to the cRIO not the camera for the video feed. This would mean that you’d have code that handles the streaming video. This will put load on the cRIO, and is unnecessary if you’re access the camera directly.
If you have the capabilities, you could hook a network sniffer to capture the traffic to the driver station. There may be some clue there.
We observed the same behavior. If we did anything to lower the camera frame rate, we’d never see the picture on the (smart) dashboard, just the empty rectangle. We did enough debugging to find that some part of the video stream decoding was reporting a timeout error. It appeared to be timing out if it took more than 33mS to capture a frame.
We replaced the netbook with an new notebook (i5-2430 core, lots of RAM) and saw the same behavior.
Eventually, we gave up on the video issues and the frequent crashes (probably due to the reported bug about exchanging C++ double-precision values) and wrote our own dashboard app in Visual Studio Express that could display video streams from both the forward- and backward-facing cameras on the robot and a targeting overlay for the drivers. (That code is freely available on our Google Code site; contact me directly if you’re interested.)