[ODE] Initial position

Martin C. Martin martin at metahuman.org
Thu Apr 22 08:29:46 MST 2004


Hi Don,

Well the nearCallback() you're using looks fine.  Can you set a 
breakpoint in it and see what sort of geoms it's called with?  Did you 
put the transform geom and/or the individual geoms in the correct space? 
  There's an example of transform geoms in the boxstack demo, that'll 
show you how to set it up.

Are you using a debug build of ODE?

> How do I translate and orient joints?

Is this before or after the joint is created?  If it's before, you need 
to transform the location (the "anchor") and any axes used.  The slider 
has a single axis, the universal joint two, etc.  You only need to 
rotate axes, not translate them, of course.

If you've already attached the joints, and attached them to two bodies 
(rather than between one body and the world), I don't think you need to 
do anything.  The should be relative to the bodies already.

> The behavior is much better now, and works nicely if I leave the 
> orientation with the identity matrix.  However, any other orientation 
> still seems to spin the model crazily upon reset.

Hmm, you need to rotate all objects about the same point in the world, 
not about their individual centers.  Can you draw your world just after 
you transform the bodies, but before you call dWorldStep(), to make sure 
that things are still connected?  You'll want to draw the location of 
the joint, and maybe the joint axes as well.

- Martin




More information about the ODE mailing list