Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix orientation of apriltags 4 and 5 #7684

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ethanc8
Copy link

@ethanc8 ethanc8 commented Jan 14, 2025

Apriltags 4 and 5 point upwards when they should be pointing downwards:
image

Negating the Y-component of the rotation quaternion fixes this.
image

The above images were made on branch quaternion-fix of Titan-Dashboard.

@ethanc8 ethanc8 requested a review from a team as a code owner January 14, 2025 22:22
@github-actions github-actions bot added the component: apriltag AprilTag library label Jan 14, 2025
@calcmogul
Copy link
Member

calcmogul commented Jan 14, 2025

This isn't the proper fix. That file is generated from https://github.com/wpilibsuite/allwpilib/blob/main/apriltag/src/main/native/resources/edu/wpi/first/apriltag/2025-reefscape.csv via https://github.com/wpilibsuite/allwpilib/blob/main/apriltag/convert_apriltag_layouts.py.

In the NWU axes convention, it stands to reason that a pitch of +30 degrees points down. The discrepancy here might be because the field used intrinsic roll, pitch, and yaw, while WPIMath uses extrinsic roll, pitch, and yaw. One can convert between them by reversing the order of the angles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: apriltag AprilTag library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants