LR logreg at free.fr
Mon Mar 20 02:49:43 MST 2006

thank you Simon.
In fact, when the spring constant is so low, the joint 'crashes'. it was my problem : i used K = 5 or 10 for a body of 5Kg Mass. Using a higher K and the documentation formula it work fine.


De : ode-bounces at q12.org [mailto:ode-bounces at q12.org] De la part de Simon Šander
Envoyé : lundi 20 mars 2006 07:34
À : ode at q12.org
Objet : Re: [ODE] SPRING

I use this function to calculate ERP and CFM.
public static void Calc(float springConstant, float dampingCofficient, float sprungMass, out float erp, out float cfm)
            float r = 2.0f * dampingCofficient * (float)Math.Sqrt(sprungMass * springConstant);
            float hk = Scene.OdeTimeStep * springConstant;
            erp = hk / (hk + r);
            cfm = 1.0f / (hk + r);



From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of hamstah
Sent: Friday, March 17, 2006 2:17 PM
To: LR
Cc: ode at q12.org
Subject: Re: [ODE] SPRING

LR wrote: 

I'm trying to use suspension in a hinge2 from spring constants that configure ERP and CFM. I'm using the documentation formula:

ERP = h kp / (h kp + kd)
CFM = 1 / (h kp + kd)
and my bodys jump .....
if i modify with :

ERP = h kp / (h  (  kp + kd  )  )
it feel really better. Is it a documentation error ? or does i have another problem ?
if i do the same modification with CFM =  1 / (h ( kp + kd ) ) my bodys jumps again ...

Hi, If i look at your formula:

ERP = h kp / (h  (  kp + kd  )  )
I can say that its equal to ERP = kp / (  kp + kd  )

and this equation doesnt take 'h' as parameter...
So I think your equation isnt correct.
Now I dont have the time to look on it, but perhaps somebody can help you with it...
see you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060320/5e54d34d/attachment-0001.htm

More information about the ODE mailing list