Limelight losing connection

We have 2 limelight twos. Both are showing the same problem. We are using the default labview dash. Power is coming direct from the pdh. Ethernet from the limelight is running to a brainbox ethernet switch, and that is connected to the Rio and the radio.

An elp USB camera is connected to the USB on the limelight.

First problem, is that often the elp camera will not show up on the stream, either in the limelight web interface or the dashboard itself. Restarting the limelight vision client repeatedly fixes this sometimes.

Second problem. Sometimes we will have everything streaming and it will lose connection. The dashboard gives the standard waiting on camera message.

Sometimes it comes back. Sometimes it doesnā€™t. Today, on one of the times it didnā€™t, we tried to navigate to the limelight web interface but could not. We disconnected the limelight ethernet from the switch and plugged directly in to the computer (static ip is set on all our components, 1 on radio, 2 on Rio, 5 on drivers station, 11 on limelight). The computer was unable to connect to the limelight even when directly connected to the limelight, until we power cycled the limelight.

We are operating on the newest limelight image.

Tomorrow we are going to try to set up a raspberry pi 3b with the wpilib image and use that for the USB camera connection. We will stop streaming the limelight to the dash in the hopes that it fixes the connection issues.

I would like to run the USB camera directly to the Rio, but we are at 80% cpu and the camera pushes us up into the 90s where we start to see increased can bus errors (which we are also right in the edge of at 85% - 95% utilization).

Iā€™m actually considering dusting off one of our old axis ip cameras if we have to.

2 Likes

We have also been experiencing this usb cam issue with a LL 2 and Lifecam. Have you had any issues with changing led modes in the web interface while ignoring the networktables index not applying until you restart the vision client? Iā€™ve been noticing that happening as well as the camera stream issues you described. We actually just ordered a 2+ for backup and in case this is a 2 specific issue.

1 Like

we were encountering the limelight losing connection issue, and we fixed this by wiring it to an ethernet switch instead of the second port of the radio, which is known to be unreliable (the static IPs being set is definitely good).

are you guys streaming the limelight / usb cam to default driver station? we also run a elp usb camera to the RIO and we lowered the resolution / fps and encoded it in MJPEG in order to reduce the cpu usage. (also make sure the settings on wherever the cameras are streaming to match what you have in the robot code)

2 Likes

Not much to add but just wanted to say that my team has had similar issues.

We have simplified as much as possible and donā€™t change modes in an attempt to help the stability.

2 Likes

Weā€™ve had ALOT of Limelight problems this year. Even a random lock up yesterday in a Quals match, that a power cycle fixed and no problems the rest of the day.

My first suggestion is to not use the USB connection on the limelight. Once we stopped using that, that helped with a ton of problems we was having that went away. Things started working ok for us. We moved the USB camera to the RoboRio USB port and stream it that way.

Donā€™t be like us and make a 3D printed cover to block the LEDs that also accidentally hits the reset button on your limelight every time you put the cover on :man_facepalming: explained why we couldnā€™t get a static IP to stick for a full day, sigh.

8 Likes

I recommend this one. FRC Limelight 2 LED Cover by ngonzal987 - Thingiverse It is a fast print and fits lightly so if you forget it on the bot your driver can just shake it off on the field.

1 Like

I would love to do that but we are on a Roborio Rio 1 and at the upper end of our cpu usage.

1 Like

I feel your pain. We are still running labview. We need to switch to JAVA soon so we can utilize some CPU savings.

1 Like

Weā€™ve had a lot more success this year running Photonvision on the limelight rather than the Limelight image.

We have a very similar networking setup with the brainbox etc, and weā€™ve had good success this year using PhotonVision with the Limelight and a HD-Lifecam connected to the USB port for a secondary stream.

Can you run photon vision on a raspberry pi 3b that has no camera attached? We were considering trying that and plugging or USB camera into it to stream over ethernet to the dashboard.

We tried the wpilib pi image, but it is forcing us to plug two cameras in to get them to be acknowledged in the dashboard.

PhotonVision wonā€™t be very useful without any cameras attached. Iā€™m not sure what youā€™re asking.

1 Like

Photon vision has the ability to stream a usb camera plugged into it. I have a raspberry pi 3. If I install the photon vision image on the pi, plug in the USB camera to the pi, will it stream to the dashboard? Or does it have to be some sort of raspberry pi camera module deal.

Yes, that will work fine. USB Cameras were actually supported better than PiCam for a while. PiCam is just the ā€œfirst class citizenā€ now, with the hardware acceleration weā€™ve added.

We run a pipeline on our USB camera attached and it works as seamlessly as the built-in camera, so I think it should work.

I wanted to type this in for posterity in the hopes that it helps someone else with vision problems.

History:
We are using a limelight to target for shooting. We also wanted a driver camera to find balls behind the goal. Initially, we used the limelight by itself, and purchased an ELP camera from Amazon and plugged it into the roborio. We tried to stream it over the standard labview dashboard.

We found that the ELP camera, using H.265/H.264, would simply crash the dashboard over and over due to an underlying code problem. (Issue has been replicated by NI - not necessarily an NI issue though).

We purchased a different ELP camera that streamed via mjpeg to rectify that problem.

We plugged the ELP into the limelight to use their picture in picture and it appeared almost instantly and we thought we were in business. However, after we plugged it into the limelight USB port to stream it we began seeing limelight disconnects, crashes, and difficulties with the ELP camera not streaming. We made sure we were up to date on all our versions and patches, but the problem continued through our first competition.

This became one of our key ā€˜next stepsā€™ to improve robot performance. We have specific location shots programmed into the robot that donā€™t need a limelight, but it still significantly hampers our cycle time when we have to drive to a location to shoot.

The first thing we tried on returning was plugging the mpeg stream ELP into the roboRio USB port. This streamed to the dashboard on the first try without a problem. But when we ran our first auto routine, the robot overshot all its marks and ended up crashing into the driver station wall. Driving it in teleop proved nearly impossible due to delayed response.

We know that we are on the hairy edge with both our canbus communications and our cpu. Our cpu has been running at 78-85%, and we work very hard to never run above that due to previous experience. Our canbus is running at an average of around 80%, and weā€™ve pulled motors off of canbus and put them on PWM until the errors mostly stopped.

Putting the ELP camera on to roborio increased our CPU by 10-15%, and the CPU use was causing the canbus to begin suffering errors as well. This caused dropped odometry information and things got ugly.

We pulled the ELP camera off the roborio usb, and tried a microsoft lifecam just to verify the same situation and we saw a similar result with the cpu usage.

Our next step was to try a coprocessor. We grabbed a raspberry pi 3B and put the WPILib pi image on it. We were able to configure it easily and got the camera streaming in the web interface, however the dashboard could not see the stream. We found (by accident) that if we plugged 2 cameras into the pi they both became active and we could stream to the dashboard, but a buggy option isnā€™t really an option.

We loaded up a couple axis cameras and got them streaming, but they werenā€™t an ideal option since weā€™d have to attach a fisheye lens to them due to their poor field of view. LIkewise, we grabbed an old Limelight 1 out of storage but had the same issue with a narrow field of view. Still not a good option.

Finally, we took the same raspberry pi from before and loaded up photon vision. It took about 20 minutes. We plugged in the elp camera and it streamed over the web interface. We connected it to the robot, and it streamed over the dashboard within another 20 minutes. So we plugged the pi into the roborio usb port for power, connected the pi by ethernet to our switch, and everything has been good since. I wish Iā€™d known how quick and easily photonvision would integrate. It was seemless.

Unfortunately, we only have 1 raspberry pi. I would love to have a spare for competition. But if you are looking for an inexpensive option to stream driver station, a raspberry pi and photonvision is likely to be your best bet.

Likewise, if you canā€™t afford a limelight, the photonvision software on a pi with a USB camera and an LED ring seems to be a VERY good solution.

2 Likes

Would plugging the USB from an ELP camera into a second Limelight (1 or 2) accomplish the same - or is photon vision necessary? And if so could we put photon vision on the limelight (we donā€™t have an R3)

We experienced drop outs of the USB camera when run through the limelight, and when the limelight crashes you will definitely lose it.

So running a second limelight just for the USB camera to connect to was something we only considered briefly. You can run photonvision on limelight hardware, but if you arenā€™t using it for image processing then you are spending $400 on a glorified raspberry pi 3b.

Iā€™ll investigate this, this is definitely not expected behavior. I often test with only one camera so the fact this didnā€™t work for you surprised me.