[ODE] Car simulation
Jens Thiele
jens.thiele at student.uni-tuebingen.de
Tue Feb 5 18:00:02 2002
Nate W wrote:
> On Tue, 5 Feb 2002, Michael Sebastian Sbrissa Bortolin wrote:
>
>
>>I thought the car mass was wrong, so I set to 1500 and apply the
>>torque without divide by 1000, now, other crazy things happen: the car
>>sink in the ground... then only way to the car stay above the ground
>>is:
>>
>> contact[i].surface.soft_erp = 0.0;
>> contact[i].surface.soft_cfm = 0.0;
>>
>
> With a heavy car, you need harder ground - this makes sense to me. :-) I
> think you can get the same effect by removing those two lines entirely,
> and also remove the "dContactSoftErp | dContactSoftCfm" flags from the
> surface.mode variable. I don't use them in my application either.
>
i think if you don't set erp/cfm for the contact the global value will
be used
in the docs there is a place expaining erp and cfm :
If you have a spring constant kp and damping constant kd, then the
corresponding ODE constants are:
ERP = h k_p / (h k_p + k_d)
CFM = 1 / (h k_p + k_d)
this might help if you are used to springs.
This also shows that erp/cfm must be changed if mass is changed
because if you take two springs and connect two different masses and
wish to have the same behaviour
they must have different spring constants kp