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.