[ODE] Re: center of mass

Nagymathe Denes denes at invictus.hu
Wed Oct 26 09:34:39 MST 2005


> By the way, I found something quite strange. The dsDrawCylinder() asks
> for length then radius, whereas the SetMassCylinder asks for radius then
> length.
> Why ?!! I never remember the right order for the one and the other. Its
> boring...
Funny. I haven't realized it yet. :o)

> -Don't you also think It could be a good idea to have a kind of
> GetGeomTransfInWorld(), to have the world coordinates of a encapsulated
> geom ?
> I did one (It's very simple based on your explanation of the drawGeom
> function in test_boxstack example). There should be one embedded in ode
> right ?
I agree. I had to make my own as well. It's just a few lines of code, but 
having a 'standard' version would make life simpler for many people. :o)
I've also added a new flag to the geoms to show if it's inside a 
geomtransform. This allows some sort of automation as i can simply call 
dGeomGetFinalPosition() for example, without having to care if the given 
geom is an independent one or not.

> -With a complex geom object, rigidbody is not necesserally in the
> 'middle' of the object so do you have any advice to position this object
> with respect to others ?
I used to use one of the geoms as a reference (the axis for example); it's 
pretty straightforward to calculate the necessary pos and R for a new geom 
or for the body, as we know that the pos and R of this reference geom is 
relative to the body.

> That sounds marvelous, but then it does strange things for me look at
> this .exe. One body+geom for the axe (fixed for debugging), and one
> complex geom (geomtransform), made of 2 wheels, one axe (3 geoms), and
> one rigidbody of course. There is a hinge to link the 2 rigidbodies,
> right direction. I bet there is a problem with the anchor. Right ?
> However I get the axe geom position with the GetGeomTransfInWorld() I
> told you above (this function worked well to put all the parts
> together). So I think the anchor should be located precisely at the axe
> geom position.
Yes, it seems to. I could have been helped more if you'd sent that portion 
of the source instead of the .exe :o)

Good luck,


More information about the ODE mailing list