From: Bernhard W. <be...@bl...> - 2014-02-10 12:36:49
|
Hi David Partly applied in CVS. Skipped: - Changes in raceengine (not useful) - Changes regarding auto reverse (would not work this way) The other parts are in the CVS with some modifications/fixes. I cannot feel a difference when driving, but I do usually not drift. You can check out the r1-3-1 branch and retest. Kind regards Bernhard On 10/26/2013 05:27 AM, David Savinkoff wrote: > Bernhard Wymann wrote: >> Hi David >> >> Thank you for the patch, it looks reasonable and I will take a note to >> put it into 1.3.6. >> >> Best regards >> >> Bernhard >> >> On 10/09/2013 08:30 AM, David Savinkoff wrote: >>> Hi Bernhard, >>> >>> This patch improves human automatic gear shifting, making controlled >>> drifting in TORCS much better. TORCS currently shifts gears by using >>> car->_speed_x (a single component of a 3D vector). This is correct >>> only when the car is traveling in the direction that is pointed, >>> not when drifting or flying off-angle. Loss of control can no longer >>> be attributed to improper automatic down-shifting while drifting. >>> >>> BTW using x, y and z vector components work better than just x and y >>> (I drove various tracks for the past day to test TORCS). >>> >>> Note that this patch is more-or-less a hack-ish proof of concept. >>> >>> TORCS has been my high velocity entertainment for four years. >>> >>> Thanks, >>> David >>> > > Hi Bernhard, > > Here is a new patch that incorporates my previous gear-shifting > patch in a more generalized way, allowing for the speed calculation > to be used throughout torcs (not only for gear shifting). > > I applied the speed calculation to steering for an improvement too. > (I got a hint from speed-dreams for this one) > > Note the gear shifting improvement and steering improvement in: > torcs-1.3.5-test1/src/drivers/human/human.cpp > > The speed calculation is also applied for improvements in: > torcs-1.3.5-test1/src/libs/raceengineclient/raceengine.cpp > torcs-1.3.5-test1/src/modules/graphic/ssggraph/CarSoundData.cpp > torcs-1.3.5-test1/src/modules/graphic/ssggraph/grskidmarks.cpp > torcs-1.3.5-test1/src/modules/graphic/ssggraph/grsmoke.cpp > > The speed calculation could also be applied for improvements in: > torcs-1.3.5-test1/src/drivers > > The speed calculation is made in: > torcs-1.3.5-test1/src/interfaces/car.h > torcs-1.3.5-test1/src/modules/simu/simuv2/car.cpp > > A constant for the yaw, pitch and roll inertial moments were > experimented with, and changed for an improvement in: > torcs-1.3.5-test1/src/modules/simu/simuv2/car.cpp > Maybe these values could be made user configurable. > > All of the improvements make for a better driving experience. > > Please try this patch. I developed these patches on a modified > car4-trb1, and tested them on car5-trb1 afterwards. > > car5-trb1 works excellently, and I recommend you do some > drift-passing on corners around the robots. Now you can > realistically scramble to save your bacon after pushing it > too far. > > Sincerely, > David Savinkoff > > ps. :) > > If the 12.0 constant used in the Inverse Moment of Inertia is > mathematically derived and not negotiable, here is my argument: > > I tried 6.0 and found that the moment of inertia was too high, > and 18.0 found it too low (subjectively tested by driving). > > Thus, 12.0 must be the best value since it is half-way-between. > > However, half-way-between seems to have the worst of too-high > and too-low. It is perfectly-bad. > > So, maybe halfway between perfectly-bad and too-something is > the answer... > > 15.0 is halfway between perfectly-bad (12.0) and too-low (18.0), > and it seems to be approximately the best value. > > > The Derivation of 15.28 :) > > Given that 12.0 is the mathematically correct constant > for this inverse moment of inertia formula: > > Constant for Moment of Inertia = 1/12 > > 1/12 * pi/4 = 0.06545 ; pi/4 [rads] works good and looks good too! > > 1/.06545 = 15.28 > |