[ODE] Repositioning a jointed body

Andrzej Szombierski qq at kuku.eu.org
Sun Oct 10 12:59:14 MST 2004


On Sat, 9 Oct 2004, John Buehler wrote:

> 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.
> 

Strange. It works fine for me. Probably because I don't touch the joints, 
only the bodies. If I understand correctly, the joint keeps the 
information about the axis/anchor relative to the bodies, so moving both 
connected bodies should keep the joint attached correctly.

-- 
:: Andrzej Szombierski :: qq at kuku.eu.org :: http://kuku.eu.org ::
:: anszom at bezkitu.com  :: radio bez kitu :: http://bezkitu.com ::



More information about the ODE mailing list