NaN Wrote:I am not sure I can follow your modifications.
The implementation is a simple iterative solver. You can try to increase the number of iterations, but it doesn't work well with large inertia ratios. The accumulatedImpulse is the total angular impulse applied by the solver. It is clamped to the constraint impulse limit. Usually one will have a lower and upper limit. I haven't noticed any issues with the current version though. Lambda is the correction impulse applied during a solver step.
If you want to use realistic values you have to increase the simulation rate and maybe use a different solver. I am impressed that it runs at 50Hz. I think 120Hz are actually too low.
What tire model are you using? I assume you are feeding realistic torque values?
Hi Nan,
Im using the same model you are using in vdrift (pacejka 94 with beckman combining method).
I can use 50Hz cause im using a first order differential equation to calc slip angle and slip ratio. In this way everything should work ok even with just 1 iteration. You just need to avoid wheel inertia to be too little (causes oscillations).
This is the code for slipratio and slipangle:
Code:
float max_dampAbsRoadVelo_absRoadVelo=Mathf.Max(absRoadVelo,dampAbsRoadVelo); // dampAbsRoadVelo usually is 7 - 10
deltaRatio = (wheelTireVelo - wheelRoadVelo) - max_dampAbsRoadVelo_absRoadVelo * differentialSlipRatio;
deltaRatio /= B; // B is longitudinal relaxation length
differentialSlipRatio += deltaRatio * Time.deltaTime;
slipRatio = differentialSlipRatio;
deltaAngle=wheelRoadVeloLat - max_dampAbsRoadVelo_absRoadVelo *tanSlipAngle;
deltaAngle/=b; // b is lateral relaxation length
tanSlipAngle += deltaAngle * Time.deltaTime;
slipAngle=-Atan(tanSlipAngle) * Mathf.Rad2Deg;
absRoadVelo is denom in vdrift.
NaN Wrote:What do you mean by clutch torque lag?
While driving (especially in lower gears) with throttle released, when I push full throttle, clutch torque raises with a lag respect of the engine torque. The result is that it seems that the clutch is slipping for something like half a second. It seems that this happens cause clutchdrag raises in a slower way than engine torque.
If you want, you can test online 1.2 version of my simulation (made with unity3d), with old clutch code that work somewhat well but you can easly notice transition between slipping and locked clutch.
http://unitypackages.net/unitycar/joomla...hp?id=city