OpenPCDet
OpenPCDet copied to clipboard
Fix(argo2): Restore compatibility with modern kornia versions (>=0.7.0)
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
korniainstallations. - 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
korniais an optional dependency primarily for specific datasets likeargo2, 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