# [ODE] movement force conversion

Jon Watte hplus-ode at mindcontrol.org
Tue Mar 15 14:15:40 MST 2005

```
The physics system will ensure that the feet remain planted, because
it will create contact joints between floor and foot, and you give it
some amount of friction. If you have a sloppy animation, it will
exceed foot friction, and it will slip. If you make friction low, it
will "walk" as if on ice, and quite possibly fall over. The draw-backs
of a physically modeled system!

You're right in that the entire leg adds inertia that makes the hip
bending harder than it "should" be. Similarly, when bending the hip
bone, you actually also counter-bend the pelvis it's attached to.
However, if you accumulate error, and increase the torque applied for
errors that remain after a few steps (a la a typical integrating
controller system), it will all average out. To make the character not
fall over, either be really good with your animation, or add a magic
torque to the root bone (typically, your pelvis) that attempts to
right it up (make it match the animation) every frame; again with an
error integration to yield extra force as necessary.

I know it sounds somewhat crazy, but it really does work, assuming
you have a reasonable physical skeleton and reasonable walk cycle
animation.

Cheers,

/ h+

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Matthias Baas
Sent: Tuesday, March 15, 2005 11:07 AM
To: ode at q12.org
Subject: Re: [ODE] movement force conversion

Jon Watte wrote:
> Now, calculate the torque necessary to move the body to the
> desired angle in the next timestep

How do you do that? A character consists of an entire hierarchy of rigid
bodies that are connected with joints. How do I calculate, say, the
torque I have to apply to the left hip joint? There is not just one
single rigid body attached to the hip joint but an entire subhierarchy
(aka the left leg). And if I later apply a torque to the knee it will
also influence the thigh which I have to take into account when
calculating the torque of the hip joint and so on...
How do I ensure that a foot with ground contact remains planted? What if
both feet have ground contact?

- Matthias -
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode

```

More information about the ODE mailing list