[ODE] Geom Transforms hate me
Adam D. Moss
adam at gimp.org
Thu Sep 25 23:50:33 MST 2003
Russ Smith wrote:
>>If it's any help, I looked at this myself several months ago and
>>concluded that the mass offset adjustment for composite objects
>>in test_boxstack probably wasn't doing the right thing anyway
>
> do you know what the bug is?
I'm afraid not -- I ended up building a composite-mass solution
from first principles IIRC pretty much as you describe in the
paragraph below, with an extra reverse-offset again when it comes
to drawing/using the body's position to account for having translated
it away from the relative position it was supposed to have been created
in. Actually it was a bit of a nightmarish trial-and-error process.
Each mass/geom's rotation is also critical in creating the composite
mass, not just its translation, and the rotation has to be done
in the right frame of refence -- I think that threw me the most.
> the fact that geometry and mass are completely independent things in ODE
> certainly makes it annoying to create composites. what the boxstack demo
> is doing IIRC is (1) computing the total mass and inertia of the composite
> object by summing up the pieces, (2) finding the offset of the body center
> of mass to the composite object center of mass, (3) offsetting
> the geometry and body positions so that the body center of mass is equal
> to the body point of reference. this last step is needed because ODE
> bodies *must* have center-of-mass == point-of-reference.
--Adam
--
Adam D. Moss . ,,^^ adam at gimp.org http://www.foxbox.org/ co:3
More information about the ODE
mailing list