[ODE] How is dQuaternion/dMatrix3 layed out?
Jon Watte (ODE)
hplus-ode at mindcontrol.org
Mon Sep 11 15:23:18 MST 2006
ODE uses radians.
However, I think the problem is elsewhere. Make sure that you generate
enough contacts for objects to come to rest. Make sure that you soften
the system a little bit with ERP and CFM. Try setting global ERP to 0.75
and CFM to 0.0005 for starters.
And, again, make sure the contact array is big enough. 10 is enough for
most shapes and simple triangle meshes; for involved triangle meshes,
you need to go higher.
Roland Plüss wrote:
>> If the box is resting on the ground, and starts jittering, then you
>> need to do the following:
> Jittering is the wrong word. The box spins around like hell and
> sometimes jumps up :/
>> 1) add angular and linear velocity dampening; typically on the order
>> of -0.01 times the current velocity (search Wiki for code)
> I am dampening already in my own code. It works for linear velocity but
> the angular one gets so high that dampening doesn't help anymore.
>> 2) make sure you use a FIXED TIME STEP (again, search the Wiki)
> I am using fixed time steps.
>> 3) enable auto-disabling of bodies, and crank up the tolerances a
>> little bit
> Like 1, with such high angular velocity I would get nowhere.
> I assume more that there is a mismatch of the angular velocity with my
> system. First does ODE use radians or degrees? It's somehow odd that
> after the first impact on the ground that I have already components in
> my angular velocity of roughly 10.0 and more. Though using degrees
> doesn't really change the behaviour except that the angular velocity is
> now down to 36 degrees per component which is still insane.
> I'm also not sure if the used rotation system ( there are 6 ) mismatches
> and causes this behaviour.
> I'm a bit out of ideas on this one.
>> / h+
>> Roland Plüss wrote:
>>> I tried now adding angular velocity to my test setup. Now this does not
>>> work at all. Although dBodyGetAngularVel tells me that there is no
>>> angular velocity ( in the case of a straight falling box with on initial
>>> angular velocity ), which is correct, I still get a box tossing and
>>> tumbling around. I tried first using the quaternion version but there
>>> things did not work too. Now how exactly is your system layed out so I
>>> can match mine to it?
>>> My Matrix looks like this internally ( World View style matrix with
>>> indices on the right side ):
>>> [ right.x | up.x | view.x | pos.x ] => [ 0, 1, 2, 3 ]
>>> [ right.y | up.y | view.y | pos.y ] => [ 4, 5, 6, 7 ]
>>> [ right.z | up.z | view.z | pos.z ] => [ 8, 9, 10, 11 ]
>>> [ 0 | 0 | 0 | 1 ] => [ 12, 13, 14, 15 ]
>>> And my Quaternion looks like this internally:
>>> [ x | y | z | w ] => [ 0, 1, 2, 3 ]
>>> How does the internal structure and meaning of a dMatrix3 or dQuaternion
>>> look like compared to this notation?
>>> ODE mailing list
>>> ODE at q12.org
More information about the ODE