[ODE] Has anybody had any luck with dJointSetAMotorAngle?

Patrick McColgan patrick at torcinteractive.com
Tue Feb 8 17:47:35 MST 2005


Am not sure I understand what the problem is now, are you trying to 
stand the cylinder upright but find that it is forced to the default 
cylinder position (i.e. with its 'long' axes paralell to the surface)?

If so it is probably because you are not compensating for the 'vertical' 
rotation when giving the AMotor angles.  If you rotate the body to begin 
with, and use its new local axes to set it relative to the motor, then 
when calculating angluar differences in the motor you must also use the 
transformed local axes.

I'm probably not explaining this very well, in mine I rotate the 
cylinder 90 degrees about its x axis to make it stand.  When I want to 
calculate the amotor angles I get the bodies rotation from ODE but ODE 
considers the initial 90 degree rotaion so I must counter this by taking 
the ODE rotation matrix and transforming it -90 about the x.

If this is even the problem you are facing.  The upside from this is 
that by the Amotor forcing the cylinder to its starting position due to 
it not being aware of the 'offset', it proves the AMotor is working.

Sergey Beloshitsky wrote:

> oh yeah, how can i forgot about it, of course it heped thanks,
> but to be ohner ,   cylinder is lays on his axis but not stays
>


More information about the ODE mailing list