Sunday, 28 March 2021

Transformation from inertial/sensor frame to the body frame

I'm working with IMU providing me with their orientation to a common Global coordinate system. I have created a segment coordinate system from a static posture with know orientations. I have placed two sensors on the thigh, rotated approx. 90 degrees around global Z and 1 on the pelvis. I need to convert the sensors orientation to the segment CS orientation. And when I measure the angle between pelvis and the Segment CS the result should be the same no matter the which thigh sensor is controlling the segment CS

enter image description here

Here is what I have for know:

q_w_Pelvis = []
q_w_R_Upperarm_medial = []
q_w_R_Upperarm_lateral = []
for i in range(len(q_Pelvis_pq)):
    q_w_Pelvis.append(q_Pelvis_pq[i]*q_start_Pelvis.conjugate )
    q_w_R_Upperarm_medial.append(q_R_Upperarm_medial_pq[i]*q_start_R_Upperarm_medial.conjugate)
    q_w_R_Upperarm_lateral.append(q_R_Upperarm_lateral_pq[i]*q_start_R_Upperarm_lateral.conjugate)


q_segment_Pelvis = []
q_segment_R_Upperarm_medial = []
q_segment_R_Upperarm_lateral = []
for i in range(len(q_Pelvis)):
    q_segment_Pelvis.append(q_segment_start_Pelvis*q_w_Pelvis[i]*q_segment_start_Pelvis.conjugate)
    q_segment_R_Upperarm_medial.append(q_segment_start_R_Upperarm_medial*q_w_R_Upperarm_medial[i]*q_segment_start_R_Upperarm_medial.conjugate)
    q_segment_R_Upperarm_lateral.append(q_segment_start_R_Upperarm_lateral*q_w_R_Upperarm_lateral[i]*q_segment_start_R_Upperarm_lateral.conjugate)

Followed by a calculation of Euler angles I know works from previous projekt.

But the result is not correct as the two sensors do not provide me with the same rotation of the segment CS. enter image description here



from Transformation from inertial/sensor frame to the body frame

No comments:

Post a Comment