Skip to content

Fix(argo2): Restore compatibility with modern kornia versions (>=0.7.0) #1722

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

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

Conversation

Qu0rise
Copy link

@Qu0rise Qu0rise commented Apr 15, 2025

Subject: Ensuring Argoverse 2 usability with current kornia releases

Dear Maintainers,

This pull request resolves a compatibility issue preventing the Argoverse 2 dataset utilities from functioning correctly with kornia version 0.7.0 and later.

Motivation & Impact:

The core issue stems from kornia removing a deprecated order argument in its rotation conversion API (v0.7.0+). Our current codebase in pcdet/datasets/argo2/argo2_utils/so3.py still utilizes this argument, leading to runtime errors for users who maintain up-to-date dependencies. This negatively impacts the user experience for those working with Argoverse 2 and potentially increases support requests related to environment setup (similar context to closed issue #1470).

Merging this PR offers several key benefits:

  • Restores Functionality: Enables seamless use of Argoverse 2 features for users with modern kornia installations.
  • Enhances Robustness: Eliminates a known source of errors, making the codebase more resilient to dependency updates.
  • Reduces Maintenance: Proactively addresses a compatibility issue, potentially preventing future bug reports.

Technical Solution:

The fix is straightforward: it removes the now-obsolete order=C.QuaternionCoeffOrder.WXYZ argument from the quaternion_to_rotation_matrix and rotation_matrix_to_quaternion function calls within pcdet/datasets/argo2/argo2_utils/so3.py. This aligns our code with the current kornia API without altering the intended WXYZ (scalar-first) quaternion convention, which remains the default or expected behavior in recent kornia versions.

Review Focus & Testing:

This change is highly localized to the argo2 utilities and directly addresses an external library API change.

  • The core logic of the rotation conversions remains unchanged.
  • As kornia is an optional dependency primarily for specific datasets like argo2, the risk to other parts of OpenPCDet is minimal.
  • Manual testing confirms the fix resolves the error with kornia>=0.7.0. Due to the nature of the fix (API compatibility), extensive new unit tests were deemed unnecessary for this specific change.

This contribution aims to improve the project's usability and maintainability with minimal disruption. I appreciate your time reviewing this change and welcome any feedback.

Best regards,

@Qu0rise

Related to: #1470

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.

1 participant