Angular velocity
How do I compute the angular velocity of an rigid body given only its rotation matrix in the current and previous frame?
Thanks in advance
If M0 and M1 are your rotation matrices in the previous and the current frame, then they are related by:
R*M0 = M1 (1)
where R is a rotation matrix.
From (1), you get that
R = M1*transpose(M0)
From http://en.wikipedia.org/wiki/Rotation_matrix:
R(0,0) + R(1,1) + R(2,2) = 1+2*cos(w) (3)
where w is the angle of the rotation, divide it by your delta, you get the angular velocity.
There is one problem though, the number of solutions to (3) is infinite, which means that strictly speaking, it's impossible to do what you are trying to do. In practice, I guess you can assume that abs(w) is small, so you can choose the smallest solution.
R*M0 = M1 (1)
where R is a rotation matrix.
From (1), you get that
R = M1*transpose(M0)
From http://en.wikipedia.org/wiki/Rotation_matrix:
R(0,0) + R(1,1) + R(2,2) = 1+2*cos(w) (3)
where w is the angle of the rotation, divide it by your delta, you get the angular velocity.
There is one problem though, the number of solutions to (3) is infinite, which means that strictly speaking, it's impossible to do what you are trying to do. In practice, I guess you can assume that abs(w) is small, so you can choose the smallest solution.
Thanks for the reply
That did help me alot with what im trying to do, but to completely solve my problem I also need the axis of this rotation (this is in 3D btw)
That did help me alot with what im trying to do, but to completely solve my problem I also need the axis of this rotation (this is in 3D btw)
I just found another article on wikipedia which will help you, see section "Log map from SO(3) to so(3)".
The formula is:
w = 1/2sin(theta) * [R(3,2)-R(2,3); R(1,3)-R(3,1); R(2,1)-R(1,1)]
I have not checked the it, but I suspect an error in their formula. It's surprisingly almost symmetrical, but not quite... I wonder if the last R(1,1) should read R(1,2)?
The formula is:
w = 1/2sin(theta) * [R(3,2)-R(2,3); R(1,3)-R(3,1); R(2,1)-R(1,1)]
I have not checked the it, but I suspect an error in their formula. It's surprisingly almost symmetrical, but not quite... I wonder if the last R(1,1) should read R(1,2)?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement