# [ODE] Re: center of mass

Guillaume Jouffroy oxymore at tele2.fr
Thu Oct 20 19:10:32 MST 2005

```> Note that the pos and R of geoms within geomtransform means their
> _relative_ pos and R in respect to the cm, doesn't matter where they
> are in  world coordinates.
>
Damn is that written in the documentation ??
When you get coordinates for body, these coordinates are world ones you
can use to draw things at the right place. I can't find where it is said
you get
object reference coordinates for geomtransform ! How do you know ? Write
a new documentation you know so much about what's hidden. I try to do a tuto
but I need to get things clear first. It will be a "ode concepts for
noobs" ;-)
I can understand the code easily now. Before making the transformation
to world coordinates, my vehicle was moving, and my complex object axe
stood in the middle of nowhere :-D

> Yes. You could move the body instead of moving all the geoms. In that
> case you'd have to rotate mass.c with R and add the result to the
> original pos. Simpler than moving the geoms, right. The only
> difference is that in this case the cm of the resulting compound
> object wouldn't be exactly at the originally given position.
>
Ehm.. rotate ?
And why it won't be exactly at the originally position ? Is that cos
rotation transformation  is approximative, I guess ?

> Yes. Now, as you've corrected the relative positions of the geoms, and
> the body is exactly at the cm, you need centered cm for the body,
> aren't you? :o)

Well I don't  :-x
Actually I try not to use what I don't understand and see whats going on.
"centered cm" ...If I move my body to the cm isn't the cm supposed to be
the center of the rb ?

> No. :o) It will connect the invisible bodies 'behind' the visible
> geoms or complex geom groups. Remember: geoms are ONLY used for
> collision detection, nothing else. Even visualizing them is just for
> debugging :o) as games used to render much more complex geometries
> instead of the 'real' geoms used for their collision tests. :o)
> The thing that confuses most novices is that the 'real' bodies that
> are subject of the forces, torques, movements, joints, etc. cannot
> really be visualized as they themselves don't have any shape. But they
> have positions, velocities, and mass properties, and can carry these
> 'shells' called geoms. So we used to render the geoms, but the bodies
> are like 'ghosts in the shell' :o))

Oh I have no problem with the real body cos I had a headache with that
before ;-)
The thing that put me into confusion is the picture in the documentation
for the hinge. Look at the relative position of the objects to each
other and the joint direction.
Will the joint work fine if there isnt this alignment ? My complex geom
structure is a kind of axe forming a L. One part of the L is actually
the axe for the wheel, and the other will go to a chassis. Its like the
wheel of the (I don't know the word) thing we push in supermarkets. If
the rb is not in alignment like in the other part of the L, won't there
be a problem ?
(Im working on the rollerrace research project if you know this vehicle)

Guillaume
```