[ODE] dBodySetRotation - representing reflection

Jaroslav Sinecky sinecky at telefonica.net
Wed Apr 12 23:45:53 MST 2006


Hi,

I'm almost sure ODE will get messed up if you set mirroring matrix for 
body, someone correct me if I'm wrong. But also I don't really see the 
need for it. It should be no  problem to create exact mirror-like setup 
for your object without mirroring matrix. You probably need mirroring 
only for your graphical object and that can be included in 
transformation from ode-body-to-graphical-body (which is usually needed 
anyway).

The only case I see reflection matrix could really be useful in ode is 
to reuse collision trimeshdata. Then you could try using matrix with 
reflection component in GeomTransform, there are chances it could work, 
since in collider matrices are used purely for geometrical transforms.

Hope this helps,
Jaroslav


Peter Krcah wrote:
> Hi,
>
> I am trying to simulate a robot with two identical arms placed 
> symmetrically on its body. Somewhere in the process of construction I 
> need to set rotation of a body using a matrix which has a reflection 
> component (so its det=-1). However, when I do this and run the 
> simulation, the rotations get completely messed up.
>
> At first I thought the problem was caused by quaternion normalization 
> in dBodySetRotation function. So I commented out the normalization 
> part, but the results didn't change. My second guess is, that the 
> problem is somewhere in the function converting matrix to quaternion...
>
> My question is: What is the best way (if any), to set body's rotation 
> to a matrix with a reflection component? Can ODE work with such 
> "rotations" at all?
>
> Regards,
> Peter Krcah
> ------------------------------------------------------------------------
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>   


More information about the ODE mailing list