Fix(argo2): Restore compatibility with modern kornia versions (>=0.7.0) #1722
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.
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 deprecatedorder
argument in its rotation conversion API (v0.7.0+). Our current codebase inpcdet/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:
kornia
installations.Technical Solution:
The fix is straightforward: it removes the now-obsolete
order=C.QuaternionCoeffOrder.WXYZ
argument from thequaternion_to_rotation_matrix
androtation_matrix_to_quaternion
function calls withinpcdet/datasets/argo2/argo2_utils/so3.py
. This aligns our code with the currentkornia
API without altering the intended WXYZ (scalar-first) quaternion convention, which remains the default or expected behavior in recentkornia
versions.Review Focus & Testing:
This change is highly localized to the
argo2
utilities and directly addresses an external library API change.kornia
is an optional dependency primarily for specific datasets likeargo2
, the risk to other parts of OpenPCDet is minimal.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