Draft
feat: support AprilTag 36h11 for ARENA XR scene relocalization#167
Conversation
Copilot
AI
changed the title
[WIP] Add support for 36h11 apriltags in XR
feat: support AprilTag 36h11 for ARENA XR scene relocalization
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ARENA uses tag36h11 AprilTags (tag #0 = scene origin) for physical relocalization. The commonly referenced
jp.keijiro.apriltagpackage only shipstagStandard41h12native binaries, making it unusable for ARENA without recompilation. This PR bundles a self-contained native plugin compiled from AprilRobotics/apriltag source with 36h11 enabled, plus a newArenaAprilTagMonoBehaviour for XR relocalization.Native plugin (
Runtime/AprilTag/Plugin/)libArenaAprilTag.so(Linux x86-64) — compiled from upstream apriltag source, exportstag36h11_create/destroyalongside the full detector APIArenaAprilTag(notAprilTag) to avoid conflicts ifjp.keijiro.apriltagis also installedPlugin/README.md— cmake build instructions for Windows, macOS, iOS, AndroidC# apriltag layer (
Runtime/AprilTag/)Self-contained P/Invoke layer adapted from the keijiro package (BSD-2-Clause attributed), with two key changes:
Interop/Family.cs— wirestag36h11_create/destroyinstead oftagStandard41h12Unity/TagDetector.cs— detector configured for tag36h11; uses Unity Jobs + Burst for pose estimationArenaAprilTagMonoBehaviour (Runtime/ArenaAprilTag.cs)Each frame: captures
WebCamTexture, detects 36h11 tags, and when tagoriginTagIdis seen, repositionssceneRootso the physical tag maps to(0,0,0)/ identity rotation in Unity world space (with optional EMA smoothing). Pose math uses the tag world-space inversion:Other
.gitattributes— marks.so/.dll/.a/.bundleas binaryThird Party Notices.md— adds AprilRobotics/apriltag and keijiro attributions