Re: Patch for wheel spin velocity traction
David Savinkoff <[email protected]> Mon, 22 Jun 2015 12:06:37 -0600 (MDT)
| Newsgroups | gmane.games.torcs.general |
|---|---|
| Message-ID | <1349243517.19957816.1434996397913.JavaMail.zimbra@mailid.telus.net> |
----- Bernhard Wymann wrote: > Hi David > > Thank you, I will have a look into this for a later version (1.4.0), I > plan as well to study the acual SAE papers and fetching a recent edition > of Pacejka's book. > > Kind regards > > Bernhard > Thank you very much. I am excited about the potential that TORCS has. If you, or anyone, has patches or observations related to TORCS physics... I'll certainly be listening. > > On 06/16/2015 01:16 AM, David Savinkoff wrote: > > Hi, > > > > This patch is the same as the previous, and has further fixes. > > Apply this patch to clean sources (not with my previous patches). > > This patch is an injection of natural physics, and an improvement. > > > > *** > > In hunk 1: > > > > stmp is removed because this line of code in hunk 3 > > is not needed anymore: > > stmp = MIN(s, 1.5f); > > > > *** > > In hunk 2: > > > > wrl calculation is corrected. wrl is the speed of the > > spinning wheel (in the direction the wheel is pointed). > > However, the wheel is sliding sideways due to the > > slip angle. Thus, the 'vector component' of wrl must > > derived from the slip angle. > > > > else if () code is factored out. > > > > Correct percent slip calculation for ALL conditions: > > sx = (vt - wrl) / (0.000001f + MAX(fabs(vt) , fabs(wrl)) ); > > if (fabs(sx) > 1.0) sx /= fabs(sx); > > > > The reason for this correction is because it is not > > physically possible to have more than 100 percent slip > > (The old code is correct 'only' under braking conditions). > > > > *** > > In hunk 3: > > > > if ((v < 2.0f) || (zforce == 0.0f)) > > replaces > > if (v < 2.0f) > > because skid marks are otherwise present in the air with this patch. > > > > > > car->carElt->_skid[index] = s; > > because s is correct, and never exceeds 1.0f (100% slip). > > > > removed: > > stmp = MIN(s, 1.5f); > > > > Magic formula uses 's' instead of 'stmp' > > > > > > > > Sincerely, > > David Savinkoff > > > > ----- David Savinkoff wrote: > >> Hi, > >> > >> I found the shocking truth that I independently derived > >> a formula for tire friction. The formula is: > >> > >> sx = (vt - wrl) / (MAX(fabs(vt) , fabs(wrl)) ) > >> > >> Please read page 2 of this authoritive paper: > >> http://bsesrv214.bse.vt.edu/Hop/Papers/Tire-Road%20Friction%20Coefficient.pdf > >> > >> TORCS and Speed Dreams need fixin' > >> > >> Sincerely, > >> David Savinkoff > >> > >> > >> ----- David Savinkoff wrote: > >>> ----- Bernhard Wymann wrote: > >>>> Hi David > >>>> > >>>> It makes in my opinion no sense in respect to the tire model, the slip > >>>> definition looks consistent as is for me > >>> > >>> I cannot make an argument here because I am not absolutely certain how > >>> the tire model interacts with 'sx = (vt - wrl) / fabs(vt)' > >>> > >>>> > >>>> (in your analysis there is a little glitch, vt is not the car velocity, > >>>> it is the wheel specific velocity, all wheels have usually at least > >>>> slightly different velocities). > >>>> > >>> > >>> I may have not have expressed myself properly when I said 'car velocity' > >>> I envisioned a single wheel in contact with the road where 'vt' is the > >>> velocity in the direction the wheel is pointed... and where 'wrl' is the > >>> wheel spin velocity (can only be in the direction the wheel is pointed). > >>> > >>>> > >>>> The proposed change would cause a discontinuity which would usually > >>>> lower the grip. > >>>> > >>> > >>> 'sx = (vt - wrl) / ( 0.000001f + MAX(fabs(vt) , fabs(wrl)) )' has an > >>> inflection point where the wheel is actuated to slip by > >>> deceleration, or slip by acceleration. > >>> The discontinuity is caused by the 'act' of braking or accelerating. > >>> > >>> I believe 'sx' may need three different functions to include: > >>> 1) braking > >>> 2) accelerating > >>> 3) wheels rotating backwards to the direction of travel. > >>> The formula for 'sx' is my best so far, and it seems to work ok. > >>> > >>> I visualize vt and wrl as two parallel lines showing their respective > >>> lengths. Where vt - wrl is the length part that differs. eg. > >>> _________________________ > >>> _____________________________________ > >>> > >>> The formula for 'sx' suggests that one wants to determine a 'normalized' > >>> slip value given vt, wrl, and vt-wrl. Note that the slip happens in > >>> several different situations. > >>> > >>>> I think a better solution for drifting is to adjust the parameters of > >>>> the tire model > >>> > >>> I just tried different tire pressures (other than the default 40 psi). > >>> I will comment on this list when I come across interesting things. > >>> > >>> *** > >>> Please actually try my latest patch traction2.diff on different cars > >>> and tracks. Drive aggressively (off-track also) or ride with Olethros 6. > >>> *** > >>> > >>>> , differential and suspension. If you don't mind to edit > >>>> the XML you can adjust as well the engine braking coefficient (instead > >>>> of adapting your accelerator control in your mind;-) ). > >>>> > >>>> Other opinions? > >>>> > >>> > >>> Others on the list... Your opinions please. > >>> > >>> Sincerely, > >>> David Savinkoff > >>> ------------------------------------------------------------------------------ Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical & virtual servers, alerts via email & sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o