[ODE] problem with stops

slipch slipch <slipch at gsc-game.kiev.ua>
Mon Jul 14 06:34:02 2003


Hello ray,

Monday, July 14, 2003, 11:28:48 AM, you wrote:

rhacj> ODE:

rhacj> I have implemented angle motors with stops, but the stops do
rhacj> not work.  The joints continue rotating in one directions, like
rhacj> wheels on axles.  Any advice?

rhacj> Tom Ray

rhacj> ----

rhacj> #define PI 3.141529654f
rhacj> dBodyID  body;
rhacj> dJointID motor;

rhacj> ..

rhacj> motor = dJointCreateAMotor(world, 0);
rhacj> dJointAttach(motor, body, Seg2.body);
rhacj> dJointSetAMotorMode(motor, dAMotorUser);



Check ODE docs. As far as I understand  it need to set
angle with dJointSetAMotorAngle for axes with stops in user mode.


 :
"...........
void dJointSetAMotorAngle (dJointID, int anum, dReal angle);

Tell the AMotor what the current angle is along axis anum.
This function should only be called in dAMotorUser mode, because in this mode the
AMotor has no other way of knowing the joint angles. The angle information is needed
if stops have been set along the axis, but it is not needed for axis motors. 
..........."