필터 지우기
필터 지우기

Finding an angle from quaternions or rotations on planes?

조회 수: 6 (최근 30일)
Vittorio Rossi
Vittorio Rossi 2018년 5월 27일
편집: James Tursa 2018년 6월 4일
Hello everyone!
For a project I'm working on I have acquired data using three sensors, placed as displayed in the picture on the human body. Each sensor is able to sample Roll, Pitch and Yaw (rotation on xy, xz and yz planes) but also quaternions (with a matrix containing q0,q1,q2 and q3).
The goal of the project is to calculate the angle of the knee and the hip (also shown in the picture). Intuitively the solution should be to somehow calculate the difference of some data between the sensor on the upper leg and lower leg for the knee joint angle and from the upper leg and pelvis for the hip angle.
I've tried two metods using MATLAB:
  • calculating the difference between q0 of one sensor and q0 of the other, q1 and q1 and so on, and then using "quat2eur" to convert them into eulerian angles, but it didn't work
  • "resetting" roll, pitch and yaw when the subject is in standing position (first picture), and then calculate the difference between sensors of roll, pitch and yaw.
Both methods don't seem to have a reasonable graph as a result, does anyone have any ideas? I feel like I'm close to the solution but I'm missing something, perhaps because I don't have a lot of experience with the subject.
Thank you so much in advance for your time!
Vittorio
  댓글 수: 2
James Tursa
James Tursa 2018년 5월 28일
You need to tell us precisely what the sensors are measuring. I.e., from what frame to what other frame?
Mo
Mo 2018년 6월 3일
편집: James Tursa 2018년 6월 4일
I used 2 sensors (thigh and shank) and have a matrix (100*4) of the quaternion for each sensor. I have seen this method (see below) to calculate the relative angle between two quaternions but cannot use it for my matrix.
An=A/norm(A);
Bn=B/norm(B);
QuatDiff=quatmultiply(quatconj(An),Bn);
ang=2*atan2(norm(QuatDiff(2:4)),QuatDiff(1));
_________________________________________
A= sensor A quaternion and B=sensor B quaternion

댓글을 달려면 로그인하십시오.

답변 (1개)

Mo
Mo 2018년 6월 3일
I used 2 sensors (thigh and shank) and have a matrix (100*4) of the quaternion for each sensor. I have seen this method (see below) to calculate the relative angle between two quaternions but cannot use it for my matrix.
An=A/norm(A); Bn=B/norm(B); QuatDiff=quatmultiply(quatconj(An),Bn); ang=2*atan2(norm(QuatDiff(2:4)),QuatDiff(1)); _________________________________________ A= sensor A quaternion and B=sensor B quaternion

카테고리

Help CenterFile Exchange에서 Coordinate Transformations에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by