[ODE] FMax and Vel doesnt wrok for me! Y?

Neelam C tina_vipul at yahoo.com
Tue Nov 2 08:37:05 MST 2004


Hi all,

I have written a simple code to simulate a leg of a dog (to make it walk). I am
using inverse kinematics and calculation joint angles for knee and shoulder. But
when I try to apply force/velocity to those joints it doesnt work. The leg
doesnt move at all! I dont know why. 

this part of code is just for knee. then using this knee angle i calculate
shoulder angle and then its the same piece of code.
---------------------------------------------------------------
        val = sqrt (((s-a)*(s-b))/(a*b)); 
        if (val > 1) // then its problem coz acos(val>1) = NaN
           val = 1.0;
        J = 2 * acos(val);
        J3 = (uRadians)(J); 
        actualKneeAngle = dJointGetHingeAngle(kJoint.jointID);

//function that actually calculates angles, positions and apply force/velocity
to //angles
        // get actualKneeAngle to J3
        jointError = (double)J3 - (double)actualKneeAngle;
        jointRate = dJointGetHingeAngleRate(kJoint.jointID);
        if ((double)jointRate < 0.1 &&(double)jointRate > -0.1 )
                jointRate = 0.1;
                                                                                
                                             
        maxForce = xx.xx;
        dJointSetHingeParam(kJoint.jointID,     dParamFMax, maxForce);
        dJointSetHingeParam(kJoint.jointID,     dParamVel, pValue*jointError);

------------------------------------------------------------------

i have varied values of maxForce and pValue and havent noticed any change! I
really dont know what I am doing wrong here.

HELP!!!

Thank you,



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 



More information about the ODE mailing list