[ODE] Quick fundamental questions about ODE.
Dave Grundgeiger
dave.grundgeiger at codenouveau.com
Thu Sep 6 18:33:50 MST 2007
Bram Stolk wrote:
> On 9/6/07, Jeremy Roberts <jroberts at digipen.edu> wrote:
>> My question is ... is approximating a large complex object like a
>> robot
>> with a single body/mass such as a sphere or box convincing enough for all
>> intents and purposes or does one have to connect multiple bodies/masses
>> say
>> with joints or create complex inertia matrices for every complex object?
>
> I think the idea is to use dMassAdd(), so you can create a sphere geom,
> a box geom, a single body. Then you create a spherical mass, a box mass,
> add the masses, and set the single mass to the body.
There's an example of this in the boxstack demo. When the user presses 'x',
a body is created that has a complex mass distribution. It's in a function
called command in demo_boxstack.cpp. Look for the "else if" that handles the
'x' keystroke. You'll see that there's a loop within which a simple mass is
created, rotated and translated, and then added into an accumulator mass
using dMassAdd. After all the masses are added in, the accumulator mass is
associated with the body using dBodySetMass. (When I say "accumulator mass,"
that's just my own wording--it's not a different kind of mass.)
If pieces of your large complex object have to move in relation to each
other though, then I would say that you should have multiple bodies
connected with joints.
Dave
-------
Seeking Contract Work
Resume: http://www.codenouveau.com/dave_grundgeiger.pdf
Testimonials (scroll down): http://www.codenouveau.com/WhoWeAre.aspx
More information about the ODE
mailing list