[ODE] "Upright" body

Alen Ladavac alenl-ml at croteam.com
Wed Apr 7 09:50:43 MST 2004


We implemented the standup avatars as a special case. We have 3 different
types of bodies: dynamic, kinematic and hybrid. For dynamic, forces can
influence all 6 D0Fs of of it, for kinematic they cannot influence it at all
(similar as static geometry, but still has velocity), and for hybrid they
can influence only the first 3 DOFs (translation). Adds a few if-s to the
joint evaluation, but gives you perfectly stiff upwards standing objects.

If you don't want those extra DOFs on some bodies, it is better to not have
them in the first place, than to allow them and then add joints that remove
them. It is both faster and more stable.

HTH,
Alen


----- Original Message -----
From: "Colin Bonstead" <colin at cyan.com>
To: <ode at q12.org>
Sent: Tuesday, April 06, 2004 23:59
Subject: [ODE] "Upright" body


> I'd like to have a physical that always stands upright on one of it's
> axis, for the avatar.  In our previous physics engine this was done by
> setting the inverse inertial tensor to all zeroes, except for element
> 2,2 which was set to DBL_EPSILON.  Frankly, I have no idea how this
> works.  However, that matrix is not invertable, so it can only work if
> you can set the inverse matrix directly.
>
> I actually hacked in a backdoor so I could set the inverse tensor but it
> didn't work right in ODE.  The avatar stayed upright, but I couldn't
> move him.  I'd prefer to move away from that method anyway, since it
> kind of seems like a hack.
>
> Another thing I tried is just zeroing out any rotation in the X and Y
> after every step (Z is up in my sim).  I know that is a crappy way to do
> it, but I just wanted to see if it would work.  It did, but not very
> well.  From searching through the ODE archives the only other suggestion
> I could find was to apply a counter force after every step.  That
> doesn't sound very viable to me since you'll always be one step behind,
> so your avatar will sort of vibrate.
>
> Anyone have any other ideas?  The angular motor seems like it could
> help, but everything I've tried with it hasn't worked.  I've read the
> docs on it at least 10 times and I still don't think I really understand
> what it does.
>
> Thanks,
> Colin
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list