[ODE] Simple Spring

Jaap Stolk jwstolk at gmail.com
Tue Apr 11 07:58:33 MST 2006


On 4/11/06, irrisor at dev.java.net <irrisor at dev.java.net> wrote:
> Jaap Stolk wrote:
> > I think you can set ERP and CFM for each joint. (but I don't know much
> > about ODE)
> Great :) - but how?

I used started using ODE a week ago, and have never set them
independently, but if you look in the manual:
http://www.ode.org/ode-latest-userguide.html

from "3.8.2. How To Use ERP and CFM"
"ERP and CFM can be independently set in many joints. They can be set
in contact joints, in joint limits and various other places, to
control the spongyness and springyness of the joint (or joint limit)."

these set the global parameters:
void dWorldSetERP (dWorldID, dReal erp);
void dWorldSetCFM (dWorldID, dReal cfm);

from "7.5.1. Parameter Functions"
Here are the functions that set stop and motor parameters (as well as
other kinds of parameters) on a joint:

depending on the joint type you need to use one of these:
void dJointSetHingeParam (dJointID, int parameter, dReal value);
void dJointSetSliderParam (dJointID, int parameter, dReal value);
void dJointSetHinge2Param (dJointID, int parameter, dReal value);
void dJointSetUniversalParam (dJointID, int parameter, dReal value);
void dJointSetAMotorParam (dJointID, int parameter, dReal value);

with one or more of these parameters:
dParamBounce
dParamCFM
dParamStopERP
dParamStopCFM
dParamSuspensionERP
dParamSuspensionCFM	

So it looks like it is possible to set them independently.

Jaap.



More information about the ODE mailing list