Detecting the amount of “instability” of joints

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Detecting the amount of “instability” of joints

Postby agsh » Wed Apr 17, 2013 11:13 am

I’ve just released the first public version of My Flight Simulator, a free radio controlled airplanes simulator that uses NGD 2.20 (through OgreNewt) for the physics. Instead of using a unique rigid body, assuming the usual airplane shape (two wings, a rudder...), I tried something different: the airplanes are built by linking bodies with joints. Each body has its own physic characteristics, such as mass, drag, lift... No shape is assumed in the engine so it is possible to simulate not so typical airplanes (delta wings, paragliders, hanggliders...).

All the things work correctly when flying at “normal” speed (~25 kmh) but the planes blow up when doing very high speed maneuvers (>70 Kmh). I’m thinking on breaking the model (delete the joints between bodies) or add some artificial drag when they get a maximum speed so it cannot excess it.

Which is the best way to get a value indicating the amount of “instability” on the model? Do I have to compute the position where the bodies should be and compare this value with their actual position (and orientation)?

Dou you have any other suggestion to improve the stability of models?

Thanks in advance.
agsh
 
Posts: 11
Joined: Fri Apr 17, 2009 12:26 pm

Re: Detecting the amount of “instability” of joints

Postby Julio Jerez » Wed Apr 17, 2013 12:04 pm

the easiest way is to simulate at smaller time step, if you are running the simulation ate 60fps, try 120 the difference is very dramatic

also you are running a very old version of the engine, try upgrading to core 300. there has bring lots of improvement

if you move to core 300 you may actually special case the plane simulation by making special joint that are solved in a dedicated loop.
that way you can run the simulation at an adaptive time step just for the vehicles.
I do that with vehicle, player controllers and triggers. core 300 has lot of new functionality.

edit:
BTW I just saw the video in youtube, very nice.
at the very least you soudl get teh laste version fo newton 2.00, 2.20 is too old and many bug were fixed for that verstion to the lastest.
you can use that as a steping step toward core 300. all should not take more than a day.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Detecting the amount of “instability” of joints

Postby agsh » Wed Apr 17, 2013 1:48 pm

Thanks a lot for your time Julio.

Increasing FPS to 120 definitely improve the simulation quality. I’ll try to update the engine too to a newer version but OgreNewt has not been "officially" maintained for months (years?)... :(

What about the “instability” estimation of the model? Is there any built-in mechanism to compute it?
agsh
 
Posts: 11
Joined: Fri Apr 17, 2009 12:26 pm

Re: Detecting the amount of “instability” of joints

Postby Julio Jerez » Tue Apr 23, 2013 1:55 pm

I was doing some work on the vehicle core 300.
The solution to the problem is the vehicle joints in core 300.

Basically the vehicke joints are special because the are solved locally to the contractions that they form.
for example in the vehicle the tire can spin at very high revolutions per secund and they do no disjoint.

The vehicle is not just cars, it can be flighing things as well.
and more importatly the application can control the accuracy of then withpout degrading the rest of the game performance.
after I completed the vehicle I will make a small demo of an simple airplane. you can take that as the base for your game.

These joints are identical to the custom joints with the exepction, they can have mutiple children joints
but they can only be one parent body. Basically they cannot have loops.
These tree hirachiacl is commonf for stff like vehicles, characters, planes, etc.

you first step is to migrate ogrenet to core 300. from there the sky is the limit if you want.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Detecting the amount of “instability” of joints

Postby JoeJ » Tue Apr 23, 2013 4:34 pm

Very interesting stuff! You should add a minimized educational demo to illustrate the technique... The car is too complex to learn from it for the average Joe :)
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Detecting the amount of “instability” of joints

Postby agsh » Fri Apr 26, 2013 5:33 am

Thanks again Julio,

I've finally upgraded my code to 2.35 and the simulation seems to be stable enough even in hight speed maneuvers. I'll try to move to core 300...
agsh
 
Posts: 11
Joined: Fri Apr 17, 2009 12:26 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest