[ODE] Find position of geom within composite?

Keith Wiley kwiley at cs.unm.edu
Fri Nov 11 00:19:25 MST 2005


Nevermind, I got it.  I think what I did is exactly what you  
suggested, transforming the position.  I got the code from drawGeom()  
in the boxstack example.  It was your advice to look at the  
transformations on the geom that got me to look at the right code to  
figure it out.  I appreciate it.  Thanks a lot.

Not that I entirely understand what's going on yet.  I'm going to  
have to sit down with the sample code and the docs and study it  
thoroughly at some point to figure out how geoms relate to bodies,  
I'm still fuzzy on it.  The docs will explain it I'm sure.

Cheers!

On Nov 11, 2005, at 12:12 AM, Megan Fox wrote:

> If you're not using GeomTransforms, then calling dGeomSetPosition maps
> directly to calling dBodySetPosition - without transform geoms,
> there's no way to offset a geom from the center of the body (well, not
> without something from the contribs patches, but I imagine you're not
> using that).
>
> WITH transform geoms, calling dGeomGetPosition and such on the geom
> (the shape geom - the box, the sphere, the trimesh, whatever - NOT the
> transform geom) should give you the local position.
>
> Maybe you're calling dGeomGetPosition() on the transform geom instead
> of the shape geom?  That would give the results you're describing.
>
> On 11/11/05, Keith Wiley <kwiley at cs.unm.edu> wrote:
>> Well, I think you're misunderstanding a little bit, although I
>> appreciate the information.  I'm very new to ODE.  The problem is,
>> for ANY geom that is a member of a particular body, dGeomGetPosition
>> returns the *same* position, the cog of the entire body...so
>> dGeomGetPosition simply does not return positional data that is
>> unique to the individual geoms making up a body, no matter how the
>> position that is returned might be transformed after the fact.  Maybe
>> I'm setting up the composite body wrong to begin with, but I think
>> it's straight out of the boxstack example.


________________________________________________________________________
Keith Wiley         kwiley at cs.unm.edu         http://www.unm.edu/~keithw

"I used to be with it, but then they changed what it was.  Now, what I'm
with isn't it, and what's it seems weird and scary to me."
                                            --  Abe (Grandpa) Simpson
________________________________________________________________________




More information about the ODE mailing list