April-tags and limelight tape

Can a limelight be used to read April tags and limelight tape if so can someone please show an example code of this in Java.


The limelight can be used to read both Apriltags and retro-reflective tape, but you need to switch pipelines depending on what you want to detect as both can’t be detected at the same time.


After you switch pipelines you can get the target values using what is shown in their docs.


Limelight running their OS is great, and @zpascual 's answer is correct.

I do want to point out that you can run PhotonVision on the Limelight hardware. With this setup, you can connect a USB camera and run both AprilTags and retroreflective tape simultaneously.


Keep in mind that last year connecting a second camera to the limelight usb port caused some instability issues. I don’t know if they ever nailed that down and fixed it.

Oh, I wasn’t aware of that! Was that with the Limelight firmware, PhotonVision, or both?

It happened to at least two teams I’m aware of for certain.

Something we did to counter that problem is by getting a switch with multiple ports to connect things to. We just had two separate streams on different network ports. One was a limelight w/ photonvision, the other was a PiCam w/ photonvision. As long as both cameras have a different addresses and hostnames, they won’t have any collisions.

Am I correct on this :theoretically you could use a lime light for both reflective tape and April tags but you can’t do both at the same time, but you can toggle between the two during a match?

You are able to switch pipelines through network tables:


1 Like

Yep. As @KH987 said, you can switch between with networktables.
What I was talking about was having two seperate streams from two seperate cameras that can be used at the same time. It won’t be as important for this game (because you can only have 1 piece at a time), but it was really helpful last year becase we tracked cargo on the ground and the hub at the same time to make our intake more accurate and be able to keep track of the goal in case they were lined up nicely.

With PhotonVision on the Limelight, and a second camera, you can do both at the same time.

That is a different problem. You should not plug anything into the second Ethernet port on the radio. I was aware of that.

@Tom_Line says that at least two teams had an unspecified problem using the USB port on the Limelight, maybe with PhotonVision (?)

Oooh okay. I think the problem there is that the USB isn’t meant to be used for the camera stream. It’s for power, or you can hook it up to a computer in order to flash it or something like that. The USB port isn’t properly configured for networking or even that sort of data in general. You’d be much better off using the ethernet port at that point.

The USB can technically be used, but I wouldn’t recommend. There isn’t anything saying you can’t transmit via USB and use the ethernet port for POE (power over ethernet) but that isn’t really what either of those are meant to do.

LimeLight says the USB-A port can be used for a second camera.

Why is there an extra usb port?
You can add a usb camera to limelight to act as a secondary driver or backup camera. The second camera stream will automatically appear alongside the primary camera stream. Limelight’s video stream uses very little bandwidth so you can safely use this feature for a competitive advantage.

The micro-USB port can only be used for imaging, see the note. Power must be supplied by the power terminals or PoE, not via either of the USB ports.

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