How decide ERP, relaxation and etc in Hinge Constraints

I use the hinge of Bullet Module.
However, under a strict condition, the hinge may sometimes shows unexpected behavior.
I think the behavior depends on the parameters of Hinge characteristics such as ERP (Error Reduction Parameter) or CFP( Constraint Force Mixing ) which are defined in the library of Bullet Physics (

About design of parameters in Hinge characteristics , how can I define these parameters in Panda3D ?

I guess that ERP means the relaxation below, is it right ?
setLimit (float low, float high, float softness, float bias, float relaxation)

And, what does meaning of “softness” and “bias” of the argument show ?

Best regards


For setting ERP and CFM look at the BulletContraint.setParam method and the BulletConstraint.ConstraintParam { CP_erp = 1, CP_stop_erp, CP_cfm, CP_stop_cfm } enumeration: … traint.php

Not every constraint supports all params in Bullet For example the bthingeConstraint (BulletHingeConstraint) supports only stop_erp, stop_cfm and cfm, but not erp (see … tml#l00987 ).

About the set_limit params softness, bias and relaxation:
The Bullet API documentation does not provide much information about these parames (see … 1ce840eb0d ). I just pass them on in case someone knows what they mean and needs to use them.
If I have to make a guess these parameters control the behaviour if the constraint get close to a limit. The limits can be either hard, i. e. stop the movement suddenly when the limit is reached, or soft, i. e. slow it down when approaching (param “softness”?), and there can be a bounce (param “relaxation”?) Usually there is a param which controls when the behaviour starts, that is, a threshold how “close” to/from the limit. Not sure if the is the “bias” param…

Dear enn0x

Thank you for quick response and telling me BulletConstraint.ConstraintParam().
I should check it out under your instruction as soon as possible.

By the way, could you tell me the meaning of arguments of
setLimit (float low, float high, float softness, float bias, float relaxation)
where softness, bias and relaxation ?
I could not find the document of these argument .

Best regards.

BulletConstraint.constraintParam is an Enumeration, not a method. So there should be no “()” behind it. You would use it for example like this:

joint.setParam(BulletConstraint.CPStopErp, 0.123, 1)

Sorry, but I really don’t know more about these params.

Dear enn0x and everybody

On the “erp” (error reduction parameter) in Bullet constraing.

I have tried to change “erp” according to the instruction by enn0x.
Recently, I have noticed that the “erp” is not changeable, but the other three parameters (stoperp, cfm stopcfm) is changeable
Why ?

My source code is listed below. From the execution result, the erp still remains zero, the other three parameters was changed.

joint = BulletHingeConstraint( jointA.node(), jointB.node(), pivotA2B, pivotB2A,	Vec3(0,1,0), Vec3(0,1,0) , True )
# parameters
erp = 0.1
stoperp = 0.2
cfm = 0.3
stopcfm = 0.4
# set each parameter
joint.setParam(BulletHingeConstraint.CPErp, erp)
joint.setParam(BulletHingeConstraint.CPStopErp, stoperp)
joint.setParam(BulletHingeConstraint.CPCfm, cfm)
joint.setParam(BulletHingeConstraint.CPStopCfm, stopcfm)

erp = joint.getParam(BulletHingeConstraint.CPErp) 
stoperp = joint.getParam(BulletHingeConstraint.CPStopErp) 
cfm = joint.getParam(BulletHingeConstraint.CPCfm)
stopcfm = joint.getParam(BulletHingeConstraint.CPStopCfm)
print "Erp = %f,  StopErp = %f, Cfm = %f, StopCfm = %f" % (erp,stoperp, cfm, stopcfm)