How calculate .rot parameter of csv_rocoder by using joint.orientation matrix?

When I looked at the data through csv_recoder, I wanted to take advantage of the value of the .rot variable.

However, when I received the nuitrack joint information through python, I found that raw_data can only get the orientation value for each joint.

I’d like to ask you a question because there is no mention of the rot variable even if I read all the articles related to orientation

Currently, I have succeeded in calculating roll, pitch, and yaw values with relative rotation matrices between joints using orientation values for each joint.

But I wonder how the rot variable of the csv_recoder comes out as a value between 0 and 180

in conclusion
1. How to compute the rot variable of csv_recoder with the value of joint.orientation

2. Where does the rotational angle of the rot variable mean? When I looked at the data through the csv_rockoder, I wanted to take advantage of the value of the .rot variable.

Hello @syncoo

Sorry for the delay in responding.

  1. To calculate the rot, 3 joins are used to get two vectors, and the angle between these vectors is measured. For example, the angle between the right shoulder and the wrist centered at the elbow

  2. As the documentation says

    • rot - optional column for the angle between two adjacent joints of Joint_Name

    Look at the picture to understand what is meant

    Summary