Open osrf-migration opened 8 years ago
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
Well the units of inertia are mass * length^2
. If the dimensions are scaled by s
, then s^2
seems reasonable based on length^2
. I do wonder, though, if the mass is changed by this scaling as well. I'm not sure how meshlab makes that calculation.
Original comment by Alessandro Tondo (Bitbucket: alextoind).
You are absolutely right and that could be the point. Indeed, from the tutorial (few rows above):
In MeshLab, there is no way to tell what the mass of the model is.
Therefore the S^5
of the tests could come from the computation of the mass: S^2
from the length^2
term and S^3
from the "scale" of the mass, i.e. a contribution of S
from each direction (with the hypothesis of constant density).
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
I think you're right that it should be S^5
and not S^2
. I just tested with a clean spherical mesh and it seems to be using a density value of 1 with mass proportional to volume. I'll update the tutorial accordingly.
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
Original comment by Alessandro Tondo (Bitbucket: alextoind).
Well done!
I also appreciate the duplicate faces note which I didn't even know it could happen.
Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).
I didn't know about the duplicate faces issue either. I found it while trying to use that robocub ball as an example, but it was giving big numbers. It's helpful when you find bugs while writing tutorials!
Original report (archived issue) by Alessandro Tondo (Bitbucket: alextoind).
I've done few experiments on getting the inertia tensor of some .dae meshes following the inertia/tutorial.md and I found out something strange.
It is said that scaling by a factor
S
(e.g 10 per axis with the default uniform scaling flag enabled, thus a factor of 1000 on the mesh volume), the scaled inertia matrixIscaled
is such thatIscaled = S^2 * I
. However, it appears to beIscaled = S^5 * I
, where in the above exampleS = 10
(not 1000). I don't know if it is physically correct, but I've tested with several values of S and it has a linear dependancy with the parameterS^5
.It could be possible that the value in the tutorial represents the volume scaling (e.g. 1000) and that its square has been confused with the previous
S^5
(actually in many cases the result is very similar: just one order wrong in the above example, but it could be greater depending on the scale factor).Last but not least I think that, in the following,
s
is not the reciprocal but exactly the scaling factor.Am I wrong?
Here are some tests: