custommultibodyvehicle problem

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

custommultibodyvehicle problem

Postby collerblade » Mon May 03, 2010 5:11 pm

Hi All
Im trying to implement a custommultibodyvehicle car. Finnaly i have found a dll wich has a normal exported functions for multibody vechicle. So im able to use cmbv from delphi. That is great, but my car isn't working fine. The problem is with the torque what im trying to apply to the front wheels. if it is small (under 500) the system works correctly, but the car is sooooo sloooow. If i incrasse the torque the wheel is starting to crackle and the car is goning pell-mell....
Help me plz i tried everything :-S

car mass is 900
wheel mass is 10
tire suspension length 0.45
tire springcost 100
tire springdamper 6
all material is the default material

what i do wrong ? Plz help me
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby collerblade » Tue May 04, 2010 2:38 am

Im using a dll from dg's tank demo. I think it is from 2008. Can this be a problem? It works there..
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby collerblade » Wed May 05, 2010 7:43 am

Plz someone help me. Or tell me how can i use the cmbv functions in the new jointlibrary dll. Because there is no "normal" exported functions there, only the c++ style exported methods with fastcall calling method. So i cant use them from delphi.
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby collerblade » Wed May 05, 2010 10:17 am

Hi. Finally i made some progress. I managed to use the new 2.20 jointlibrary. It was a pain to use call the c++ fastcall methods from delphi, but it is complete now.
Suprise:
The behavior of my car is the same. I think my problem is that i dont use the AddSlipDifferencial() function. What is that? I did not found any information about it. I tried to pass some values, but after 502 calls it cracks with "access violation". (The returned integer is incressing by every call, and it stopped working at 502).

Plz help meeeee
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby JernejL » Wed May 05, 2010 10:49 am

Can you produce a demo so that julio and dave can debug it?
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: custommultibodyvehicle problem

Postby collerblade » Thu May 06, 2010 8:19 am

Delfi wrote:Can you produce a demo so that julio and dave can debug it?

The stuff is big, but i will publish a video on youtube tomorow.... my workplace has better uploading speed...

But the parameters are simple. There is a multibody car with 4 wheels. The front wheels are drived. They aren't turned. When the user press "up", i apply 10000 torque for both front wheels. And backwards i apply -10000 with the applytiretorque method. Nothing else are set, or modified. The start settings are:

tire:
mass 30
width 0.5
radius 0.5
suspension length 0.65
springconst 100
springdamper 6

car:
mass 900
up vector: y-vector
front vector: x-vector

materials:
all body has the default material including tires

A week ago i tried dgraycastcar (found in an older dll). These settings worked well with raycastcar. But with multibodycar the car goes left or right (depends of the yaw of the car).

I don't use ApplyTireRollingDrag and AddSlipDifferencial methods. What are they doing?
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby collerblade » Fri May 07, 2010 9:08 am

Hi all
Huh, i made 2 videos about my problem.

http://www.collerblade.hu/video1.avi
http://www.collerblade.hu/video2.avi

They are a bit large :D. In the first video i pressed the forward arrow button, and in the second video i pushed the backward button ONLY. Still my car is turning. How can 1 solve this problem?
I think the problem is with differential, i dont use AddSlipDifferencial() method.

Plz help me: CollerbladE
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby collerblade » Sun May 09, 2010 10:43 am

anyone any idea?
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby Dave Gravel » Sun May 09, 2010 3:42 pm

Here the video download is very slow.
Maybe your better to use divx plug-in or other for get better compression.
I can't download it.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 801
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: custommultibodyvehicle problem

Postby Julio Jerez » Sun May 09, 2010 7:59 pm

I can not see the video either.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: custommultibodyvehicle problem

Postby bleubleu » Sun May 09, 2010 8:59 pm

This is REALLY off-topic, but where did you get that little grass texture for your little sprites? I want it!

-Mat
bleubleu
 
Posts: 17
Joined: Sat Apr 21, 2007 5:51 pm
Location: Montreal, Canada

Re: custommultibodyvehicle problem

Postby collerblade » Mon May 10, 2010 5:39 am

hi all :)
So i published this videos on youtube. Now it is better i hope.
http://www.youtube.com/user/collerblade#p/a/u/1/JJTyX1oT9_4

check it plz.

Thx CollerbladE
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Re: custommultibodyvehicle problem

Postby Julio Jerez » Mon May 10, 2010 8:08 am

collerblade wrote:Hi All
Im trying to implement a custommultibodyvehicle car. Finnaly i have found a dll wich has a normal exported functions for multibody vechicle. So im able to use cmbv from delphi. That is great, but my car isn't working fine. The problem is with the torque what im trying to apply to the front wheels. if it is small (under 500) the system works correctly, but the car is sooooo sloooow. If i incrasse the torque the wheel is starting to crackle and the car is goning pell-mell....

The same library also have the dgRayCastCar, that car is meant to soleve all those problems
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: custommultibodyvehicle problem

Postby Dave Gravel » Mon May 10, 2010 10:20 pm

I have already seen something similar, but because front and rear tire don't use same value.
From what you say both front and rear seen to use same value...
No idea about what can cause this sorry.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 801
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: custommultibodyvehicle problem

Postby collerblade » Tue May 11, 2010 2:56 am

hi all
Dave:
Hm.. the Z value of the wheels are not the same (left & right). I will try this.. I hope this will work..

Julio:
Now im using the newes (2.20) dll. And i think raycastcar isnt good for me because im writing a rally game, so i dont wanna change. But i tried raycastcar, & i think multibodycar is far more better.
But I still have 2 questions.
1. What is AddSlipDifferencial() function does? (How to use it?) I havent found any information about it.
2. What is AddTorque() function does?? (Yes, without the tire index!!!) Im currently using AddTireTorque().

Thx CollerbladE
collerblade
 
Posts: 88
Joined: Mon Apr 05, 2010 12:09 pm

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron