Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clutch not locked but not slipping??
03-07-2012, 09:10 PM,
#12
 
NaN Wrote:The code is here: https://github.com/logzero

Certain things are missing that affect car handling considerably. The simulation is running at the same rate as the rigid body code which will be too slow for the tire model(120Hz). Wheel reaction torque is not applied to chassis. Camber is ignored. ABS, TCS don't work.

You have to use vdrift-data-dev for it.

thank you Nan. In these days i tested the alternative implementation.
In order to make it work i had to make some modifications:

Code:
        inertiaEff = (engineInertia*drivetrainInertia/(drivetrainInertia + gearRatio * gearRatio * engineInertia))*Mathf.Abs(gearRatio)*10;
//Mathf.Abs(gearRatio)*10 added in order to minimize the clutch torque "lag"
float velocityError = (engine_speed - drive_speed);
float lambda = -velocityError * inertiaEff;

accumulatedImpulseOld = accumulatedImpulse;
accumulatedImpulse += lambda;
impulseLimit=clutch_position * torqueCapacity*Time.deltaTime;
//accumulatedImpulse=Mathf.Clamp(accumulatedImpulse, -impulseLimit, impulseLimit); // i had to comment this line cause it prevent car from moving
lambda = (accumulatedImpulse - accumulatedImpulseOld);
lambda=Mathf.Clamp(lambda, -impulseLimit, impulseLimit); // added in order to avoid impulse to be greater than torquecapacity*dt
return lambda;

engineInertia=0.3
drivetrainInertia=0.01

lambda is used for the engine, -lambda * gearRatios[gear] * finalDriveRatio for the wheels (im not using a differential).

drivetrainInertia*Sqr(finalDriveRatio) is added to wheel inertia.

With this modifications it works somewhat well (it doesnt work well with some settings of engineInertia)

Anyway there is now way to make it work with my target time step (0.02, 50 step per sec). With this time step It has serious oscillations or heavy clutch torque lag.

Do you have any suggestion?
Thanks
Michele
Reply


Messages In This Thread
Clutch not locked but not slipping?? - by NewLife - 03-02-2012, 07:20 PM
[No subject] - by NaN - 03-03-2012, 03:15 AM
[No subject] - by NewLife - 03-03-2012, 09:19 AM
[No subject] - by NaN - 03-03-2012, 11:48 AM
[No subject] - by NewLife - 03-03-2012, 03:07 PM
[No subject] - by NaN - 03-03-2012, 03:44 PM
[No subject] - by NewLife - 03-03-2012, 05:21 PM
[No subject] - by NaN - 03-04-2012, 04:28 AM
[No subject] - by NewLife - 03-04-2012, 08:12 PM
[No subject] - by NaN - 03-05-2012, 10:33 AM
[No subject] - by NaN - 03-05-2012, 10:38 AM
[No subject] - by NewLife - 03-07-2012, 09:10 PM
[No subject] - by NaN - 03-08-2012, 04:39 AM
[No subject] - by NewLife - 03-10-2012, 10:36 AM
[No subject] - by NaN - 03-10-2012, 12:28 PM
[No subject] - by NewLife - 03-17-2012, 12:28 AM
[No subject] - by NaN - 03-17-2012, 06:52 AM
[No subject] - by NewLife - 03-22-2012, 01:16 AM
[No subject] - by NaN - 04-01-2012, 09:37 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)