[ODE] dBodySetFiniteRotationAxis usage

drreagan drreagan at Princeton.EDU
Sat Apr 6 11:53:01 2002


Hi

I've been messing around a bit with test_buggy.cpp and have been
attempting to follow the methods for keeping the error down on rapidly
rotating objects sugested in the ode docs.  However, i'm having some
trouble getting dBodySetFiniteRotationAxis to work properly.  Here's the
code I have in simLoop():

//keep front wheels aligned
 dVector3 axis1, axis2;

dJointGetHinge2Axis2(joint[0], axis1);
 dJointGetHinge2Axis2(joint[1], axis2);

 dBodySetFiniteRotationAxis(body[1], axis1[0], axis1[1], axis1[2]);
 dBodySetFiniteRotationAxis(body[2], axis2[0], axis2[1], axis2[2]);

i called dBodySetFiniteRotationMode() for the wheels when I created them
in main().

With this code, the front wheels flip back and forth between two
orientations at every timestep:

0.000000 1.000000 0.000000
0.666667 -0.333333 0.666667

What am I doing wrong?

Thanks in advance
Dustin