[ODE] Mass translation problems

Adam D. Moss adam at gimp.org
Thu Dec 2 15:04:28 MST 2004


Jonas Svegland wrote:
> I have a dynamic trimesh (with a box mass) attached with a hinge joint 
> to the world. I'm trying displace the centre of mass of this rigid body 
> using dMassTranslate, but I can't seem to get it to work. The effect I 
> want from this is a kind of pendulum thingy.
> 
> I think I have read something about this function not working properly 
> on this list a while back. Has anybody got this function to work? Any 
> ideas of how to accomplish this?

While the function works, ODE still requires the centre of mass
to be body-relative 0,0,0.  So rather than displacing the centre
of mass to match the non-centred mass of the body's geoms, you
should counter-displace the body's geoms such that the centre of
mass is the body origin (while preserving the desired asymmetric
mass distribution).

Regards,
--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3


More information about the ODE mailing list