[ODE] how to make a spring??

Kosei Demura kosei.demura at gmail.com
Tue Mar 6 07:21:46 MST 2007


It could be useful if we can set CFM and ERP for all kind of joints
separately, i.e., not dWorldSetERP and dWorldSetCFM..

There is dParamCFM,  however, there is  no  dParamERP.
So, in my simulation, I simulate a spring system as follows.

Regards,

Kosei
http://demura.net

----------------------------------------------
static void simLoop (int pause)
{

    dSpaceCollide(space,0,&nearCallback);

    // spring and damper system
    static dReal kp = 1000; // spring constant

    dReal tmp =  dJointGetSliderPosition(slider_joint);

    dReal f = - kp * tmp;
    dJointAddSliderForce(slider_joint, f);

    dWorldStep(world,STEP_SIZE);
    dJointGroupEmpty(contactgroup);
  }
}
------------------------------------------


2007/3/5, Irrisor <irrisor at dev.java.net>:
>
> That's true. But you can't set CFM and ERP for ball and fixed joint.
> Thus we use the attached patch in ODEJava to provide access to those
> paramters.
> Maybe it could be applied to SVN?
>
> Regards,
> Irrisor
>
> Jon Watte (ODE) wrote:
> > A spring is a linear constraint with a low/high stop set to the rest
> > point, and the joint CFM/ERP values set based on the spring constant and
> > dampening. This is mentioned in the manual.
> >
> > Cheers,
> >
> >           / h+
> >
>
> _______________________________________________
> ODE mailing list
> ODE at ode.org
> http://mooshika.org/mailman/listinfo/ode
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mooshika.org/pipermail/ode/attachments/20070306/4cd82ea3/attachment.htm


More information about the ODE mailing list