[ODE] Mass translation problems

Matthew Hancher mdh at email.arc.nasa.gov
Fri Dec 3 10:17:40 MST 2004


>> The translation of a mass is not respected by a body. The center of 
>> mass is
>> always at the center of the body. You have to instead translate your 
>> geom,
>> typically using a GeomTransform. This is mentioned in the FAQ, by the 
>> way.
>
> Is that really true?  In my simulation I use dMassTranslate(0, -5000, 
> 0) to
> translate the mass of my characters downwards.  I found that this 
> caused the
> objects to not topple over.  Removing this line allows the objects to 
> topple.
> This is how I keep all my characters upright in the game.. and it 
> seems to
> work.. so what am I missing?

What you are seeing is probably caused by the fact that when you 
translate the
dMass's center it also affects the inertia tensor, increasing the 
rotational
inertia about axes perpendicular to the axis of translation.  (The 
inertia
tensor stored in the dMass is also always with respect to the body 
center,
rather than the center of mass.)  The resistance to tipping that you're 
seeing
is in fact just an artifact of that high rotational inertia.  If that 
solves
your tipping problem then cool, but if you really want to model the 
mass being
below the ground you'll need to move the whole body down there and bust 
out
some dGeomTransforms to move the geoms back up to the surface, as h+ 
and the
FAQ noted.

mdh

Matt Hancher
NASA Ames Research Center
mdh at email.arc.nasa.gov



More information about the ODE mailing list