Closed Chalet37 closed 2 years ago
To represent a rotation, a quaternion should be a versor, i.e. have norm 1. Your quaternion_val
doesn't but quaternion_to_matrix
understands that you mean the rescaled version of it. Also a factor of -1 does not affect the rotation represented by a quaternion, so the change of sign is irrelevant.
There is no bug and there is nothing wrong with your code.
To represent a rotation, a quaternion should be a versor, i.e. have norm 1. Your
quaternion_val
doesn't butquaternion_to_matrix
understands that you mean the rescaled version of it. Also a factor of -1 does not affect the rotation represented by a quaternion, so the change of sign is irrelevant.There is no bug and there is nothing wrong with your code.
My fault. Thank u~
I used pytorch==1.7.1, pytorch3d==0.6.1, python3.8. I tried following code:
the quaternion should have been equal to quaternion_val, but I got different value:
tensor([[0.1287, 0.0468, 0.9670, 0.2148]])
Is it a bug or there is anything wrong with my code? Thank you