I am aware of three ways to integrate angular velocities:
a) Using the quaternion derivative: q' = 0.5 * w * q
b) Creating an finite rotation from the angular velocity and the timestep dt, basicall alpha = Length( w ) * dt and axis = Normalize( w )
c) Bullet has also something called exponential map (I think SOLID has this as well)
So what are the differences between them and what are the advantages/disadvantages of one over the other? Are there any other decision criteria, but performance (e.g. simulation quality)?
Also in this context:
How do you damp angular velocity? Simply using something like: w *= 0.995 before integrating torques makes my solver results worse. Any ideas why this is so and what is a good strategy to damp the angular velocity (e.g. preventing non-linearities because of high angular velocities. We could damp as a function of the actual angular speed in order to damp high velocities down quickly, but don't touch moderate ones).
Integrating angular velocities
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
-
- Posts: 126
- Joined: Wed Jul 27, 2005 10:28 am
- Location: SCEE London
b) and c) should be the same. see also the following paper for the advantages/disadvantages:Dirk Gregorius wrote:So which method is more accurate and why?
http://www.cs.cmu.edu/~spiff/moedit99/expmap.pdf
the exponential map integration is drift free, so there is no need of normalizing. The immediate consequence is that you can integrate for much larger time steps. For example If we measure the angular error in a control scheme(motors) and then we numericallly integrate by using the quaternion derivative, our control scheme would take longer to converge as the way we measure the error and the way we fix it is not fully consistent as there is some drift proportional to the timestep.
so with the exponential map you can reach zero angular error in one numerical integration step.
cheers,
Antonio
-
- Posts: 6
- Joined: Wed Apr 18, 2007 8:12 pm
-
- Posts: 126
- Joined: Wed Jul 27, 2005 10:28 am
- Location: SCEE London
that looks like the exponential map approach to me, axis and magnitude, where the magnitude is the angular speed scaled by the time step.mhx wrote:Maybe it's already been implied in the thread, but there is also the closed form integration technique for quaternions. See for instance htttp://graphics.stanford.edu/~rachellw/files/articulated.pdf. Page 4, eq 1.
Don't remember the exat source of it, think it might be NASA?
Formula (1) behaves badly when the angular velocity is close to zero.
the link to the paper i posted earlier(see Section 3) shows how the problem can be solved by a simple Taylor expansion.
cheers,
Antonio
-
- Posts: 49
- Joined: Sun Dec 03, 2006 12:40 am
AntonioMartini wrote: that looks like the exponential map approach to me, axis and magnitude, where the magnitude is the angular speed scaled by the time step.
Formula (1) behaves badly when the angular velocity is close to zero.
the link to the paper i posted earlier(see Section 3) shows how the problem can be solved by a simple Taylor expansion.
cheers,
Antonio
A Taylor expansion doesn't make it fully stable. It is still unstable with regard to rotations around the middle axis, if the moment of inertia is non-homogeneous. Thus, problem not solved.
It is quite strange though, that methods from Molecular Dynamics haven't made it to computer graphics yet.
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
-
- Posts: 126
- Joined: Wed Jul 27, 2005 10:28 am
- Location: SCEE London
could you elaborate a bit more please? the Taylor expansion is mainly used in order to convert from the exponential map to a quaternion, so there is no inertia there. The sinc(x) function is evaluated by a Taylor expansion just because it's not already in the standard maths libs.KenB wrote:A Taylor expansion doesn't make it fully stable. It is still unstable with regard to rotations around the middle axis, if the moment of inertia is non-homogeneous. Thus, problem not solved.AntonioMartini wrote: that looks like the exponential map approach to me, axis and magnitude, where the magnitude is the angular speed scaled by the time step.
Formula (1) behaves badly when the angular velocity is close to zero.
the link to the paper i posted earlier(see Section 3) shows how the problem can be solved by a simple Taylor expansion.
cheers,
Antonio
It is quite strange though, that methods from Molecular Dynamics haven't made it to computer graphics yet.
cheers,
Antonio