Skip to content

How we can compute Euler angles from Quaternion form? #16

@Algabri

Description

@Algabri

I am trying to use the Quaternion form instead of rotation matrices.

I already trained my model, but when I need to test the model, I must compute Euler angles from the Quaternion form as you did with computing Euler angles from rotation matrices.

For example, the output in Quaternion form for B = batch_size = 2 (-> Bx4) is :

 tensor([[ 0.0725, -0.0645,  0.0308,  0.9948],
        [-0.5235, -0.2456,  0.0824,  0.8117]], device='cuda:0')

And, the output in rotation matrices form for B = batch_size = 2 (-> Bx3x3) :

tensor([[[ 0.9933, -0.0871,  0.0755],
         [ 0.0850,  0.9959,  0.0316],
         [-0.0779, -0.0250,  0.9966]],

        [[ 0.7244, -0.0551, -0.6871],
         [ 0.2493,  0.9503,  0.1866],
         [ 0.6427, -0.3065,  0.7021]]], device='cuda:0')

Could you help me with how we can compute Euler angles from Quaternion form?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions