[ODE] Repositioning a jointed body

John Buehler johnbue at msn.com
Sat Oct 9 11:44:29 MST 2004


John Buehler writes:

> I've been having some trouble repositioning a jointed body.  I
> have a human figure which I create at the origin, then move to
> its proper starting position by using dBodyGetPosition/
> dBodySetPosition.  Originally, my joints were kept simple and
> were all hinges.
>
> To move the figure, I get/set each body's position, and do the
> same with the joints.  I don't touch the geoms.  I found that
> the figure would rocket off into the distance if I tried that
> combination.

After continued experiments, it seems that the reason that moving a jointed
figure is a bad idea is because there is no way to move the entire jointed
structure in a single operation.  Hinges will tolerate a separate move of
each body that it is attached to, while ball joints, and possibly other
complex joints, apparently will not.

I've worked around the problem by creating the jointed figure at its start
position, and ODE behaves as expected.  Unfortunately, it limits my ability
to directly manipulate the positions of my jointed figures through the user
interface other than by destroying them and recreating them at the desired
position.

I would recommend an addition to the ODE documentation that warns of trying
to programmatically move a jointed body through a series of dBodySetPosition
calls.

JB




More information about the ODE mailing list