Forums

Full Version: New sim code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
All cars have been converted to the new sim implementation. Next step is to check center of mass, test for body roll.

A few cars(F40) are having problems with the new clutch. To be more correct, the autoshift logic is having trouble to get into next gear, need to look into this.
I've resurrected -cartest {carname} functionality for brakes fine tuning. It is interesting that a few cars I've tested(360, LE, XS) perform worse with ABS, have longer stopping distance. But at least you'll get greater stability with ABS. So it should be OK for now.

F1-02 is as usual the exception having about 25% shorter stopping distance with ABS.
As a sanity check.

Honda S2000 from web:
0-60 mph 5.4 - 6.2 s (depending on the model year)
Quarter mile 13.8 - 14.7 s
60-0 Stopping Distance 113 ft

VDrift XS:
0-60 mph 6 s
Quarter mile 14.5 s
60-0 Stopping Distance 125 ft
60-0 Stopping Distance(ABS) 129 ft

Now if I could get the ABS to work properly, 113 ft should be reachable too. 8)
I've got AI working. It needs some serious refactoring though imho. There is just too much going on. The code could be much simpler for what it is doing. This would also make it easier to extend AI behavior.

On the simulation side the autoclutch/shift logic had a few fixes, behaving better now.
Was working on the cars a bit, testing on Ruudskogen as it has slow and fast sections and some nice banked turns. About twenty cars are done. Another twenty five or so remain, sigh.
I have been fighting with too much wheel travel(with possible roll over) in high speed turns(banked) yesterday, trying to use harder anti-roll settings and stiffness.

Just checked the suspension code and noticed that suspension over-travel was not reimplemented. Displacement would simply be clamped to max travel also clamping suspension response this way. Duh.

After fixing it the issues are gone too. Smile
Sim code is in master now. I'll be looking for regressions the next few days.

If you run into issues report here ( or https://github.com/VDrift/vdrift/issues ).
I've got the last rev..
os: win 7 x64
codeblocks

cleaned before build.

Output:

||=== vdrift, Release ===|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
C:\Vdrift\src\parallel_task.h|65|error: invalid conversion «long unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*) {aka long unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*)}» в «pfnSDL_CurrentBeginThread {aka unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*)}» [-fpermissive]|
vdrift-win\include\SDL\SDL_thread.h|105|error: while initializing 4 arg «SDL_Thread* SDL_CreateThread(SDL_ThreadFunction, const char*, void*, pfnSDL_CurrentBeginThread, pfnSDL_CurrentEndThread)» [-fpermissive]|
||=== Build finished: 8 errors, 0 warnings (4 minutes, 5 seconds) ===|

p.s. errors were in native lang, tried to translate correctly.
p.p.s. NaN, your last link to issues is broken because of the bracket.
(08-30-2012, 02:23 AM)nomoo Wrote: [ -> ]I've got the last rev..
os: win 7 x64
codeblocks

cleaned before build.

Output:

||=== vdrift, Release ===|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
vdrift-win\include\SDL\SDL_stdinc.h|636|warning: «M_PI» redeclared|
C:\Vdrift\src\parallel_task.h|65|error: invalid conversion «long unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*) {aka long unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*)}» в «pfnSDL_CurrentBeginThread {aka unsigned int (*)(void*, unsigned int, unsigned int (*)(void*), void*, unsigned int, unsigned int*)}» [-fpermissive]|
vdrift-win\include\SDL\SDL_thread.h|105|error: while initializing 4 arg «SDL_Thread* SDL_CreateThread(SDL_ThreadFunction, const char*, void*, pfnSDL_CurrentBeginThread, pfnSDL_CurrentEndThread)» [-fpermissive]|
||=== Build finished: 8 errors, 0 warnings (4 minutes, 5 seconds) ===|

p.s. errors were in native lang, tried to translate correctly.
p.p.s. NaN, your last link to issues is broken because of the bracket.
I think I've seen this before. You are running the official mingw? Can you try replacing it with mingw-w64?
web: http://mingw-w64.sourceforge.net/
download: http://sourceforge.net/projects/mingw-w6...z/download

Uninstall/remove previous mingw version. Extract the content into C:/mingw32 or C:/mingw. If codeblocks complains about compiler, set Settings/Compiler/Toolchain executables
C Compiler: gcc.exe
C++ Compiler: g++.exe
Linker for dynamic... :g++.exe

Do a rebuild.

There is a minor auto clutch regression with F1-02 at start(first gear), need to make the logic a bit more clever.
Clutch issue fixed.

Windows build for anyone running with svn data (@berzingue):
http://sourceforge.net/projects/vdrift/f...e/download
I've found some info on S2000 spring rates and sway bars:
http://www.s2ki.com/s2000/topic/863751-official-cr-faq
Characterization_of_Honda_S2000_OE_Springs_rev1.pdf

It turns out that sway bars are rather stiff devices. The anti-roll stiffness of XS.car has been 1000 and 6000 N/m. The real world stiffness values are 62016 and 54483 N/m. They exceed the suspension spring stiffness!

I think we need to review anti-roll bar settings for a number of VDrift cars.
I've upped a video of a G-P34 test run. Current ABS algorithm is having a really hard time with those tiny front wheels.

http://www.youtube.com/watch?v=ziUSi5ApD6w
Found/fixed a bug in ABS code.

New values for XS:
60-0 Stopping Distance (real world) 113 ft
60-0 Stopping Distance (no ABS) 116 ft
60-0 Stopping Distance (ABS) 111 ft

I know it is maybe nothing to get too excited about. But it is kinda cool to get the same values as the real world vehicle. I wish I had some race telemetry to test the sim a bit more. Big Grin
(09-02-2012, 11:46 AM)NaN Wrote: [ -> ]I know it is maybe nothing to get too excited about. But it is kinda cool to get the same values as the real world vehicle. I wish I had some race telemetry to test the sim a bit more. Big Grin

I'd have to say that's pretty ^@$%#* awesome NaN!
I've added tire force vectors drawing as a sim debugging help, wondering if this should go into master.

Hitting the brakes during cornering. Getting into a slight drift. The rear right wheel is in the air:
[Image: forcemv.jpg]
Pages: 1 2 3 4 5