CustomMultiBodyVehicle Joint

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: CustomMultiBodyVehicle Joint

Postby Sash » Tue Apr 20, 2010 8:00 am

Still canont get it working right.
The biggest problem - a lack of grip (friction between tire and surface). Even with *huge* values set by NewtonMaterialSetDefaultFriction.
The only solution I found - to add some "helper" forces - I'm adding more "gravity" to the body and steering helper torque to compensate side slip at higher speeds.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby Julio Jerez » Tue Apr 20, 2010 1:13 pm

the friction in newton is never ever larget that twice the normal force.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: CustomMultiBodyVehicle Joint

Postby Sash » Sat Apr 24, 2010 5:59 am

Yes, I figured that out - that's why I need extra forces to press down a body (although this introduces some other unwanted effects).
Pity I didn't find a working vehicle sample (either RC or MB) with torque enabled to start playing with.

BTW, I have implemented an Ackerman steering (different steering angles for inner and outer wheels when turning) - it helped to maintain grip (but just a very little).
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sun Jun 20, 2010 6:50 pm

HELLO GUYS, I AM BACK!!! :P
I think i have theory why wheels are slipping so much.
First my explanation:
When i apply engine torque on steering tires and try to turn my vehicle, vehicle under steers and goes straight or i don't get much grip to climb 1% slope. I have to create material for wheels and set static and dynamic friction to 16.0 which is not what it should be( read http://hyperphysics.phy-astr.gsu.edu/hbase/mechanics/frictire.html the 0.7 a lot less that 16.0)
I dont want to solve this with Material Pairs, if i have n types surfaces and m types of tires i need to make m*(n+m) of different material pairs which is a LOT and ugly and probably kills performance.!!

It seems that the mass of whole vehicle is not added to force that pushes tires on the ground and result is no grip which gives me idea that the wheel is jumping(oscillating) in floating point error distances.

The wheel spins and because of floating point precision wheel jumps(oscillates because of suspension) in micro distances so the real ground contact is never established(as it should be in real life -> elastic of softbody ) its just pulsing instead of having constant connection. :(

@Julio: i suspect you have some bug/glitch in newton lib which causes this problem i suspect, maybe is connected to that(http://newtondynamics.com/forum/viewtopic.php?f=9&t=5638&hilit=explosion&start=15#p40928) bug i reported a while back. I hope this idea will help you solve some of your bugs.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Sash » Tue Jun 22, 2010 7:04 pm

PJani wrote:The wheel spins and because of floating point precision wheel jumps(oscillates because of suspension) in micro distances so the real ground contact is never established(as it should be in real life -> elastic of softbody ) its just pulsing instead of having constant connection. :(


Is this a pure assumption or you have some data (f.e. from debugger ?)
I believe if wheel jumps in "micro" distances it affects contact forces only by a "micro" amounts then.

p.s. Although I posted my doubts, I'm very interested in getting working vehicle in the end.
p.p.s. Probably it needs to log and compare contacts data for steady and spinning tires.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby PJani » Tue Jun 22, 2010 11:04 pm

Sash wrote:Is this a pure assumption or you have some data (f.e. from debugger ?)
I believe if wheel jumps in "micro" distances it affects contact forces only by a "micro" amounts then.

Sorry no real data, just experience. ;)
I had very exact problem a while a go, with my long lost project. If you look carefully the code for suspension(in Wheel Joint class), you will see that suspension will NEVER REST. That means it will constantly change force applied to the vehicle and most important to wheels. Because wheels are purely rigid in newton in contrast to RL materials(RL tires are constantly contracting and expanding), they will not keep constant connection to the ground(which explains why i had to set friction koef to 16.0 instead of RL 0.7, so if i am correct every 22(=16/0.7) ticks wheel establishes connection and then releases it.)


So to solve this problem, collision check will need error distance checking(in case of small(error) distances from ground will still be counted as collision), Julio correct me if i am wrong!

I will test my theory when i get some free time, which now is very khm none, but i am very sure this is the problem.

Edit:
Sash wrote:p.s. Although I posted my doubts, I'm very interested in getting working vehicle in the end.
p.p.s. Probably it needs to log and compare contacts data for steady and spinning tires.


Even if you make wheels without a suspension you will get the same problem because joints are not rigid and they are acting like "suspension". You can test that with Hinges and very heavy chassy.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Sash » Wed Jun 23, 2010 3:26 pm

PJani wrote:Even if you make wheels without a suspension you will get the same problem because joints are not rigid and they are acting like "suspension". You can test that with Hinges and very heavy chassy.


I had a chance to see joints are not absolutely rigid. The more difference in masses (forces) of connected bodies - more likely you'll get unstable joint...

So if it is just a matter of "micro" oscillations, what about adding more damping to suspension? Maybe add some filtering to suspension behavoir...
Anyway it's up to Julio or someone more experienced to decide if this is a bug or just a not accurately configured vehicle parameters.

Personally I have nothing against material pairs, if it will work as a functional sample.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby PJani » Wed Jun 23, 2010 4:43 pm

Its not the problem in suspension, suspension works fine. I am trying to tell that the wheels are bouncing of the ground when they hit ground and most of the time they are in "air" few floating points in distance from collision. Their bouncing is amplified by suspension which pushes wheels down and makes more bouncing.

I will soon start testing this problem and i will try to find solution. I dont like to set friction coef to 16.0, just to gain some friction which will only help when driving and turning, but unreal when your car will need to skid or something. With 16.0 as a friction coef i just CAN'T make my truck to skid, sory but i cant if i set friction to less than 16.0 i have problem with traction and turning. Its not real. I will need to find somehow a way to make rigid tires "soft", maybe contact callback will help.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Sash » Thu Jun 24, 2010 2:48 am

Ok ... in other words you're stating about wrong interaction between flat (surface) and round rolling (wheel) collision shapes.
Again it could be a matter of wrong elasticity (we need neutralize these wheel bounces) .

p.s. I'm not against your idea, I'm just trying to figure out how the situation could be improved.
Sash
 
Posts: 34
Joined: Wed Sep 30, 2009 3:38 am
Location: Novosibirsk

Re: CustomMultiBodyVehicle Joint

Postby PJani » Thu Jun 24, 2010 4:21 pm

Sash wrote:Ok ... in other words you're stating about wrong interaction between flat (surface) and round rolling (wheel) collision shapes.
Again it could be a matter of wrong elasticity (we need neutralize these wheel bounces) .

p.s. I'm not against your idea, I'm just trying to figure out how the situation could be improved.


Hehe, dont wory. :mrgreen:

Look at this sketch i drawn.
Attachments
idea.PNG
idea.PNG (28.44 KiB) Viewed 5916 times
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Scarabol » Sun Aug 22, 2010 8:23 am

Hey guys this thread ist realy helpfull for me, so whats up here?

Any new results?

What about to change the elasticity of the wheels material?

And could someone release a demo to play around with?

MfG
Scarabol
Scarabol
 
Posts: 24
Joined: Sun Jan 25, 2009 9:21 am

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sun Aug 22, 2010 1:58 pm

Scarabol wrote:Any new results?


nope, just fails.

Scarabol wrote:What about to change the elasticity of the wheels material?


hmm the bodies are rigid so the softness and elasticity would not help. :/
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Scarabol » Sun Aug 22, 2010 2:22 pm

How did u made the screen video?

I want to show you my results.

MfG
Scarabol
Scarabol
 
Posts: 24
Joined: Sun Jan 25, 2009 9:21 am

Re: CustomMultiBodyVehicle Joint

Postby PJani » Sun Aug 22, 2010 3:19 pm

Hmm you mean video of game screen? I did it with fraps.
| i7-5930k@4.2Ghz, EVGA 980Ti FTW, 32GB RAM@3000 |
| Dell XPS 13 9370, i7-8550U, 16GB RAM |
| Ogre 1.7.4 | VC++ 9 | custom OgreNewt, Newton 300 |
| C/C++, C# |
User avatar
PJani
 
Posts: 448
Joined: Mon Feb 02, 2009 7:18 pm
Location: Slovenia

Re: CustomMultiBodyVehicle Joint

Postby Scarabol » Sun Aug 22, 2010 4:17 pm

ok, this is my very early tank demo and my first youtube video, too.

Enjoy!


MfG
Scarabol
Scarabol
 
Posts: 24
Joined: Sun Jan 25, 2009 9:21 am

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest