Hello,

I am using ZED2 for body tracking. I am able to get the angles of the joints, but I get them in quaternions, but I want to use Euler angles instead. My problem is that when I transform the quaternion angles to euler angles, all 3 angles values change even when I move in 1 axis. For example, I raise my arm sideways, but all 3 angle values change. Is there a simple way to understand what each angle represent or to separate the values so I get rotations similar to Euler angles rotations?

I am trying to get the angles to use them on another software to animate motion captured data.

Thanks,

Hi,

The quaternions can be converted to Euler angles using the `getEulerAngles()`

method ( https://www.stereolabs.com/docs/api/classsl_1_1Rotation.html#abfcd80187b306258e228872efbe20e4f).

You first need to create a Rotation from the quaternion using the `setOrientation()`

method (https://www.stereolabs.com/docs/api/classsl_1_1Rotation.html#a70877b576c4cb0cb5bac8e88fbc17858).

Best,

Benjamin Vallon

Stereolabs Support

Thank you for your reply

Can you elaborate more about how to use setOrientation() and set it properly for my case?

And will I get independent Euler angles if I use this method?

My problem is that I am seeing 3 axis changing when I should see only 1 changing. In other words, I want Euler axis to be independent.

Thanks,

Hello again,

I am still not able to solve my problem. It seems to me that getEulerAngles() is only for position tracking of the camera, not for body tracking. I am not able to specify which angle I want to convert, which is probably because this function is only meant for the camera angles itself, not for tracked objects.