[ODE] Units - Mass relationship

Mattias Fagerlund mattias at cambrianlabs.com
Fri Feb 7 04:34:01 2003


> As I understand it, dimensions in ODE do not have a particular unit. I
> understand this for dimensions of objects in relationship to for
> instance speed and gravity. But what I don't understand is how I should
> use the mass parameters in relationship to this. For instance, in my
> project I use meters as dimensions. I set the gravity to a real world
> value like this:
> 
> dWorldSetGravity(m_odeWorld, 0, -9.81, 0);
> 
> Now I make a massbox of 1x1x1 meter like this:
> 
> dMass m;
> dMassSetBox(&m, 1, 1.0, 1.0,1.0);

Yep.
 
> Now I want to make that box have a weight of 1 kilogram. What do I have
> to fill in this:
> dMassAdjust(&m, 1);

The box allready weights 1. Kilogram or no, 1 * 1 * 1 multiplied by a 
density of 1 = 1. That'll be a very low density box. 1 gram per liter? 
Nothing wrong with that. If you want to stay metric and create a box of 
the same density as water, you'd need;

dMassSetBox(&m, 1000, 1.0, 1.0, 1.0);

cheers,
m