angle_axis_to_quaternion returns (w, x, y, z) instead of (x, y, z, w)
See original GitHub issuedef angle_axis_to_quaternion(angle_axis: torch.Tensor) -> torch.Tensor:
r"""Convert an angle axis to a quaternion.
The quaternion vector has components in (x, y, z, w) format. # <-- says (x, y, z, w)
# ...
return torch.cat([w, quaternion], dim=-1) # <-- does (w, x, y, z)
proposal:
return torch.cat([quaternion, w], dim=-1)
Similarly, in quaternion_to_angle_axis:
q1: torch.Tensor = quaternion[..., 0]
q2: torch.Tensor = quaternion[..., 1]
q3: torch.Tensor = quaternion[..., 2]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
kornia.geometry.conversions - Read the Docs
Tensor: r"""Convert 3d vector of axis-angle rotation to 3x3 rotation matrix. ... WXYZ) return quaternion_to_angle_axis(quaternion, ... WXYZ` instead.
Read more >Conversion between quaternions and Euler angles - Wikipedia
Spatial rotations in three dimensions can be parametrized using both Euler angles and unit quaternions. This article explains how to convert between the...
Read more >kornia/conversions.py at master - GitHub
r"""Convert 3d vector of axis-angle rotation to 3x3 rotation matrix. ... WXYZ). return quaternion_to_angle_axis(quaternion ... WXYZ` instead.".
Read more >Why you changed from Quaternion WXYZ to XYZ Euler
Suppose you use XYZ Euler and rotate an Object +/- 90°, then you have what is called Gimbal lock; rotating around the X-axis:....
Read more >Scripting API: Quaternion.w - Unity - Manual
Quaternion -w script example // Create a Sphere and apply a texture to help ... void Awake() { // Add a line that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I didn’t realize the convention was inconsistent with other quaternion related functions in kornia itself. In this case this should be flagged as bug maybe rather than enhancement?
@amonszpart @schuhschuh let’s follow ceres convention [w, x, y, z] - we should also explain somewhere in the docs quaternion definition. There was even a proposal from @versatran01 to have a separated module similar to pyquaternion.