Skip to content

Add ArUco families support, deep-copy utilities, and pose ambiguity handling#428

Open
fspindle wants to merge 3 commits intoAprilRobotics:masterfrom
fspindle:add_aruco_and_utilities
Open

Add ArUco families support, deep-copy utilities, and pose ambiguity handling#428
fspindle wants to merge 3 commits intoAprilRobotics:masterfrom
fspindle:add_aruco_and_utilities

Conversation

@fspindle
Copy link
Contributor

This PR introduces three major improvements to the AprilTag library: native support for ArUco tag families, deep-copy utility functions for better memory management, and an API to retrieve the alternative pose solution during pose estimation.

1. Native ArUco Support

Integrated the ArUco dictionaries into the AprilTag ecosystem. This allows users to detect ArUco markers using the robust AprilTag 3 detector without needing external conversion tools.

  • Added families: 4x4, 5x5, 6x6, 7x7 (various sizes from 50 to 1000) and ArUcoMIP36h12.
  • Updated apriltag_pywrap, apriltag_demo, and opencv_demo to support these new families.
  • Added comprehensive tests in test_quick_decode.c.

2. Deep-Copy Utilities

Added functions to simplify memory management when detections need to be passed between threads or stored beyond the detector's lifecycle.

  • apriltag_detection_copy(): Deep copy of a single detection.
  • apriltag_detections_copy(): Deep copy of a zarray_t of detections.
  • apriltag_detector_copy(): Clones a detector configuration.

3. Pose Ambiguity Handling

Planar markers often have two mathematically plausible pose solutions. I've exposed the second solution from the orthogonal iteration algorithm.

  • Added get_second_solution() to apriltag_pose.h.
  • This allows developers to use temporal filtering or external constraints to choose the correct orientation when the error difference is small.

- Add apriltag_detection_copy() and apriltag_detections_copy() for deep copying results.
- Add apriltag_detector_copy() to clone detector configurations.
- Implement get_second_solution() in apriltag_pose to expose the alternative
  pose solution from orthogonal iteration.
- Improve API flexibility for multi-threaded applications and pose ambiguity handling.
- Integrate ArUco dictionaries: 4x4, 5x5, 6x6, 7x7 with varying sizes (50-1000).
- Include ArUcoMIP36h12 family support.
- Update Python wrappers and docstrings to expose new families.
- Update C and OpenCV demo examples to support ArUco family selection.
- Add quick_decode tests for all new ArUco families.
@christian-rauch
Copy link
Collaborator

This is a massive PR. Can you split the three parts into dedicated PRs?

Because the ArUco support is quite a substantial shift in scope for the library, I suggest submitting the other two PRs first.

fspindle added a commit to fspindle/visp that referenced this pull request Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants