PhotonVision Beta 2023: AprilTags

AprilTag Support

This release adds tracking support for AprilTags. PhotonVision can identify these square visual markers and produce a three-dimensional estimate of the transform between the camera and the marker. This new functionality will enable pose estimation out of the box as the 2023 game will feature the addition of AprilTags around the field.

This release is for use with 2022 WPILib, NOT the 2023 beta.

Get It Here

Note:

This is a beta release, so the docs are currently under development. The installation instructions are the same as usual and can be found here. For Pi 4 users, see the Known Issues section.

The Tags:

Per FIRST’s announcement, the 2023 tags will be from the 36h11 family and will be 8.125 inches square, which means the black square is 6.5 inches across. The 200mm tags provided as PDFs here, when printed at 103% scale, match the dimensions nearly perfectly. These can be printed on a regular printer, but need to remain flat on a surface to be detected, with nothing inside the thin black border surrounding the tag. Clipboards work well for this.

Tips:

  • AprilTag detection is generally impervious to lighting conditions. A reasonably well lit environment can be helpful so the tags are visible. Hard-edge shadows falling partially across the tag are known to cause issues, however.
  • Increasing resolution on the “input” panel will increase detection distance, but decrease FPS. That’s often a good tradeoff with these tags.
  • Calibrating your camera at your desired resolution is REQUIRED for the 3D pose estimation.

PhotonLib:

PhotonLib’s API includes a way to get the 3D transform information of the tags. To do this, we have to bundle some features that will be part of 2023 WPILib. Those features are not quite finalized, so PhotonLib functionality and documentation is still somewhat unfinished.

Known issues:

  • GPU acceleration has been temporarily disabled to improve auto exposure performance – a driver fix is expected before the 2023 season starts.
  • SimVisionSystem is not functional at all and might be replaced for 2023.
  • Some Pi4s that have been flashed with recent firmware are unable to run the PhotonVision image. We need to fix our Pi image generator to use a newer base firmware.

Community:

Join us on Discord for questions, feedback, suggestions, et cetera.

45 Likes

Great… now what am I going to do with my stockpile of Green LEDs?

19 Likes

Halloween is coming!

7 Likes

Underglow

9 Likes

Robot rave?

4 Likes

O: Looks great! Excited to look into this soon :slight_smile:

Up and running

14 Likes

Any setup feedback?

BTW Threshold view is just unused, so you can hide it.

How’s performance with and without pose estimation? (assuming you have with pose estimation set up)

3 Likes

Bright green LEDs are fun to recycle into a webcam light to make sure your face is gloriously illuminated during any Zoom meeting you might join.

8 Likes

Apologies for not having modified HQ-sized versions ready for this release, but I hope to release an updated version of the tags this weekend, time permitting. I will update this thread here, and the cover page on the new set of tags will clearly denote them as 8.125" square, not 200mm.

5 Likes

I have only gotten it setup and then took that screenshot. I have done nothing with trying to get or send data… that’ll be up to the kids.

Setup: imaged using BalenaEtcher (already had from Limelight), no problems. Pi3b with a 32GB microSD.
Ran an ethernet cable directly from the pi to my laptop, turned off wi-fi, went to the photonvision.local:5800 address and it popped up in retroreflective mode. Switched to Apriltag and what you see is what I got.

Pretty painless. Only hiccup was I didn’t have a modern keyboard to plug in, so I used an old G4 iMac (clear plastic) USB keyboard. Worked perfectly.

1 Like

Why did you need an external keyboard? You shouldn’t have to use one for imaging.

Out of curiosity, and for my own point of comparison, what type of frame rate are you seeing or do you expect to see with PhotonVision?

It’s highly dependent on detector settings, resolution, and device type. I get around 5-10 fps on 640x480 on a Gloworm.

I guess I didn’t?! I thought I had to log in to the pi. I’m a mechanical/cad guy. Teach physics. The Pi’s functions is dark magic to me. But I get GUIs. :grin:

3 Likes

Well, I’m glad our non-computery comrades don’t have trouble with the setup. Just what we like to hear.

1 Like

Here’s my first test of the PhotonLib support, which actually works in sim to connect to the real camera.

5 Likes

@Brandon_Hjelstrom Early game play from Photon Vision, will Limelight be adding this feature any time soon?

8 Likes

Does April tags benefit from an auto focus camera? I’m guessing no as I’ve only seen fixed focus cameras used for vision tracking.