strong impulses when actuating joints

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: strong impulses when actuating joints

Postby Julio Jerez » Tue Oct 09, 2018 11:18 am

I did not expect solver mode 0 to fix this, you need to wait until I get it fix, I did not have time to work on it last weekend, I see if I can fix it tonight.
It is not a hard fix.

This bug I knew was there, when I added a dead zone but when I did my test, it was not as bad that I did not even noticed, but you and Melting Plastic are using for more extreme conditions that I, so the jitter is amplified and is time to get it fix.

Basically what it needs is a complementary one dimension mini lineal equation to determine the closest approach, there are thing like that in the engine that I never did quite fix because it demand a lot of work for something that is used much, and given I only one person I put my effort in the places that need more attention.
I wish every thing was finalized, but the engine has grown a lot and if I spend time on a feature until is 100 % complete then I word make little progress.

this now need more attension so I will try fixing teh next day or two.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby Dave Gravel » Tue Oct 09, 2018 12:41 pm

I don't expecting to solve the problem by saying it too.
Just i'm pretty sure blackbird need to use solver 0 for this simulation type.
From the test result you can see when solver 1 or 2 is use it can go bad or come hard to get stable simulation.
I have make more tests from my side about the solver with hexapode,
I can get pretty stable simulation with all solver model by changing mass or other values but 1 and 2 give more errors and explode situation when the joint have hard times.
I just talk about it to make sure blackbird don't lose time to try to setup the simulation by using wrong solver.
I know the engine use 0 by default but I say this because I remembered he have already change it for test with other problem before.
Exemple forgetting one joint with a different solver in a global joints setup can become hard to find in final.
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: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: strong impulses when actuating joints

Postby blackbird_dream » Wed Oct 10, 2018 3:08 am

No problem Julio.
I'm testing things meanwhile.
The solution of updating the colliders procedurally by scripts seems to be an acceptable alternative solution. To be verified in details.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: strong impulses when actuating joints

Postby Julio Jerez » Wed Oct 10, 2018 9:35 am

alright I updated the fork lift demo in the sand box and committed it as default until the bug is fixed.

I though I had to add a heavy object to lift and reproduce the bug, but that's not really necessary,
the bug can be reproduce easy by tilting the palette forward and lowering down is such way that the pallet lift the vehicle body, and there is the joints overshoot and I do no remember that happing.

Ok now that I have the repro I can fix it, but thats all the time I have today. I will continue tomorrow or tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby blackbird_dream » Wed Oct 10, 2018 10:21 am

that's a step. Good work.
Many thks.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: strong impulses when actuating joints

Postby Julio Jerez » Wed Oct 10, 2018 3:11 pm

Ok blackbird_dream and Melting Plastic, I believe I now have the proper fix for the hinge and slider actuators.

I tur out that the jitter was cause b the dead zone indeed. the very idea instability because as soon as you reach the dead zone, the joint will specified that is has a zero acceleration but no zero velocity.

so when the joint reach the dead zone eh solver calculate a reaction to make the acceleration zero.
in general this speed will be small and the joint stop but if there are strong forces or torque the joint may drift and still be in the dead zone.

so this can happen for a few frame until goes outsize the dead zone and the a large accretion is calculate again to kick back to the dead zone.

now the force is always calculated even when is in dead zone. the difference is that now use a low pass filter, when is the dead zone is simple say I want to go to the target by only travel 0.3 percent of the distance.
0.3 since a good value, 0.5 is that absolute max maximum
because to move for zero to some speed the equation of motion is h = 0.5 * a / t ^ 2

therefore using a large than 0.5 value will over shoot, using a too small may not counter solve error,
0.3 seem quite good.

please sync and check it out, tell me if it works.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby blackbird_dream » Thu Oct 11, 2018 8:39 am

I'm sorry it crashes here.
newton-dynamics-350914d01b74f74136240a6ba5c81f2356d23ffe
NewtonUnityPlugin-0cea8b6265c5d3c6cf95605cb66ba29c822e365a
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 10:09 am

I keep hearing that the unity plugin crashes but I do not know where an why,
I just run new of the test scenes in the plugin and is no crashing for my.
does it say anything or where?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby blackbird_dream » Thu Oct 11, 2018 10:24 am

this :
Unity Editor [version: Unity 2017.3.1f1_fc1d3344e6ea]

NewtonWrapper.dll caused an Access Violation (0xc0000005)
in module NewtonWrapper.dll at 0033:dc0da845.

Error occurred at 2018-10-11_162116.
C:\Program Files\Unity\Editor\Unity.exe, run by
69% memory in use.
8137 MB physical memory [2459 MB free].
16271 MB paging file [9815 MB free].
8388608 MB user address space [8386598 MB free].
Read from location 00000030 caused an access violation.

Context:
RDI: 0x3d99d300 RSI: 0x00000030 RAX: 0x00000001
RBX: 0x00000000 RCX: 0x3d999780 RDX: 0x3d956e40
RIP: 0xdc0da845 RBP: 0x00000000 SegCs: 0x00000033
EFlags: 0x00010293 RSP: 0x394dfc60 SegSs: 0x0000002b
R8: 0x3d99e2c0 R9: 0x37039c28 R10: 0x00000175
R11: 0x394dfc20 R12: 0x00000000 R13: 0x3700d3c0
R14: 0x00000000 R15: 0x394dfd80

Bytes at CS:EIP:
4c 39 36 0f 84 88 00 00 00 44 8b bc 24 b0 00 00

Stack:
0x394dfc60: beeffd14 3e858627 bfce9b2b 3f800000 ....'..>+......?
0x394dfc70: 3d99e2c0 00000000 00000000 00000000 ...=............
0x394dfc80: 00000000 00000000 00000000 00000000 ................
0x394dfc90: 00000006 00000000 3d956e40 00000000 ........@n.=....
0x394dfca0: 3d99d300 00000000 00000001 00000000 ...=............
0x394dfcb0: 3c888889 00000000 00000000 00000000 ...<............
0x394dfcc0: 3d9a1700 00000000 371755a0 00000000 ...=.....U.7....
0x394dfcd0: dc164fb8 000007fe 00000000 00000000 .O..............
0x394dfce0: 00000001 00000000 3700d3c0 00000000 ...........7....
0x394dfcf0: 00000001 00000000 dc13b592 000007fe ................
0x394dfd00: 37175c38 00000000 394dfd80 00000000 8\.7......M9....
0x394dfd10: 00000001 00000000 dc0db402 000007fe ................
0x394dfd20: 3700d3c0 00000000 3f74c802 3f800000 ...7......t?...?
0x394dfd30: 3700d4a8 00000000 0043b8f0 00000000 ...7......C.....
0x394dfd40: 3da75dc0 00000000 dc0c07a5 000007fe .].=............
0x394dfd50: 00000000 00000000 37175be0 00000000 .........[.7....
0x394dfd60: 00000000 00000000 37175be0 00000000 .........[.7....
0x394dfd70: dc164fb8 000007fe dc0f688c 000007fe .O.......h......
0x394dfd80: 371754c0 00000000 3c888889 00000002 .T.7.......<....
0x394dfd90: 00000010 00000006 00000000 00000000 ................
0x394dfda0: 3c888889 00000000 00000000 00000000 ...<............
0x394dfdb0: 00000000 00000000 00000000 00000000 ................
0x394dfdc0: 00000000 00000000 0043f9bd 00000000 ..........C.....
0x394dfdd0: 00000000 00000000 dc0a3615 000007fe .........6......
0x394dfde0: cea584be 000013de 371754c0 00000000 .........T.7....
0x394dfdf0: 00000001 00000000 00000000 00000000 ................
0x394dfe00: 37175b98 00000000 dc13d0be 000007fe .[.7............
0x394dfe10: 00000000 00000000 00000000 00000000 ................
0x394dfe20: 00000000 00000000 00000000 00000000 ................
0x394dfe30: 00000000 00000000 00000000 00000000 ................
0x394dfe40: 37175b48 00000000 dc13d485 000007fe H[.7............
0x394dfe50: 00000000 00000000 00000000 00000000 ................
0x394dfe60: 00000000 00000000 392de6b8 00000000 ..........-9....
0x394dfe70: 17379b00 00000000 dc13d2e9 000007fe ..7.............
0x394dfe80: 00000000 00000000 37175b48 00000000 ........H[.7....
0x394dfe90: 00000000 00000000 00000000 00000000 ................
0x394dfea0: fffffffe ffffffff 00000000 00000000 ................
0x394dfeb0: 392de838 00000000 dc13d289 000007fe 8.-9............
0x394dfec0: 392de838 00000000 00000000 000007fe 8.-9............
0x394dfed0: 392de838 00000000 00000000 00000000 8.-9............
0x394dfee0: fffffffe ffffffff 00000000 00000000 ................
0x394dfef0: 00000000 00000000 dc13d219 000007fe ................
0x394dff00: 3d6de280 00000000 00000000 00000000 ..m=............
0x394dff10: 00000000 00000000 00000000 00000000 ................
0x394dff20: 3d6de280 00000000 dc11f468 000007fe ..m=....h.......
0x394dff30: 3d6de280 00000000 00000000 00000000 ..m=............
0x394dff40: 00000000 00000000 00000000 00000000 ................
0x394dff50: 00000000 00000000 76ec59cd 00000000 .........Y.v....
0x394dff60: 00000000 00000000 00000000 00000000 ................
0x394dff70: 00000000 00000000 00000000 00000000 ................
0x394dff80: 00000000 00000000 7712383d 00000000 ........=8.w....
0x394dff90: 00000000 00000000 00000000 00000000 ................
0x394dffa0: 00000000 00000000 00000000 00000000 ................
0x394dffb0: 76f4bac0 00000000 76f4bac0 00000000 ...v.......v....
0x394dffc0: 394dedf0 00000000 00000000 00000000 ..M9............
0x394dffd0: 00000000 00000000 00000000 00000000 ................
0x394dffe0: 00000000 00000000 00000000 00000000 ................
0x394dfff0: 00000000 00000000 00000000 00000000 ................

Module 1
C:\Program Files\Unity\Editor\OpenRL_pthread.dll
Image Base: 0x80000000 Image Size: 0x0000f000
File Size: 42496 File Time: 2018-01-26_224424
Version:
Company: Open Source Software community LGPL
Product: POSIX Threads for Windows LPGL
FileDesc: MS C 32 bit
FileVer: 2.9.0.0
ProdVer: 2.9.0.0

Module 2
C:\Program Files\Unity\Editor\OpenRL.dll
Image Base: 0x80000000 Image Size: 0x00c30000
File Size: 12654592 File Time: 2018-01-26_224424
Version:
Company: Imagination Technologies, Inc.
Product: OpenRL™
FileDesc: OpenRL™ Library
FileVer: 1.5.100.0
ProdVer: 1.5.100.0

Module 3
C:\Windows\system32\xinput1_3.dll
Image Base: 0x00400000 Image Size: 0x0001e000
File Size: 107368 File Time: 2007-04-04_195422
Version:
Company: Microsoft Corporation
Product: Microsoft® DirectX for Windows®
FileDesc: Microsoft Common Controller API
FileVer: 9.18.944.0
ProdVer: 9.18.944.0

Module 4
C:\Windows\system32\MSVCR100.dll
Image Base: 0x743a0000 Image Size: 0x000d2000
File Size: 829264 File Time: 2011-06-11_011538
Version:
Company: Microsoft Corporation
Product: Microsoft® Visual Studio® 2010
FileDesc: Microsoft® C Runtime Library
FileVer: 10.0.40219.325
ProdVer: 10.0.40219.325

Module 5
C:\Windows\system32\MSVCP100.dll
Image Base: 0x74480000 Image Size: 0x00098000
File Size: 608080 File Time: 2011-06-11_011538
Version:
Company: Microsoft Corporation
Product: Microsoft® Visual Studio® 2010
FileDesc: Microsoft® C Runtime Library
FileVer: 10.0.40219.325
ProdVer: 10.0.40219.325

Module 6
C:\Program Files\Bonjour\mdnsNSP.dll
Image Base: 0x745d0000 Image Size: 0x00026000
File Size: 133392 File Time: 2015-08-12_170342
Version:
Company: Apple Inc.
Product: Bonjour
FileDesc: Bonjour Namespace Provider
FileVer: 3.1.0.1
ProdVer: 3.1.0.1

Module 7
C:\Windows\system32\ksuser.dll
Image Base: 0x74950000 Image Size: 0x00006000
File Size: 5120 File Time: 2015-12-08_210732
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: User CSA Library
FileVer: 6.1.7601.19091
ProdVer: 6.1.7601.19091

Module 8
C:\Windows\system32\kernel32.dll
Image Base: 0x76eb0000 Image Size: 0x0011f000
File Size: 1163264 File Time: 2018-04-23_020042
Version:
Company: Microsoft Corporation
Product: Système d’exploitation Microsoft® Windows®
FileDesc: DLL du client API BASE Windows NT
FileVer: 6.1.7601.24117
ProdVer: 6.1.7601.24117

Module 9
C:\Windows\system32\USER32.dll
Image Base: 0x76fd0000 Image Size: 0x000fa000
File Size: 1009152 File Time: 2016-11-10_183242
Version:
Company: Microsoft Corporation
Product: Système d’exploitation Microsoft® Windows®
FileDesc: DLL client de l’API uilisateur de Windows multi-utilisateurs
FileVer: 6.1.7601.23594
ProdVer: 6.1.7601.23594

Module 10
C:\Windows\SYSTEM32\ntdll.dll
Image Base: 0x770d0000 Image Size: 0x0019f000
File Size: 1665336 File Time: 2018-04-23_020714
Version:
Company: Microsoft Corporation
Product: Système d’exploitation Microsoft® Windows®
FileDesc: DLL Couche NT
FileVer: 6.1.7601.24117
ProdVer: 6.1.7601.24117

Module 11
C:\Windows\system32\normaliz.DLL
Image Base: 0x77270000 Image Size: 0x00003000
File Size: 2560 File Time: 2009-07-14_033142
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: Unicode Normalization DLL
FileVer: 6.1.7600.16385
ProdVer: 6.1.7600.16385

Module 12
C:\Windows\system32\PSAPI.DLL
Image Base: 0x77280000 Image Size: 0x00007000
File Size: 9216 File Time: 2009-07-14_034154
Version:
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
FileDesc: Process Status Helper
FileVer: 6.1.7600.16385
ProdVer: 6.1.7600.16385


== [end of error.log] ==
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 10:43 am

can you run a debug dll maybe it say some with more meaning.
that does not mean anythong to me?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 12:02 pm

do you know how to debug a dll?
if you launch unity from the dll build, you might be able to get a trace stack of where the crash happened.
that log does not mean much to a cpp dev, it is some unity thing that has meaning to them.

from visual studio there are better and more familiar way to get info about a crash.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 1:41 pm

do you still have the last ID of the SDK that was no crashing?
form there to the one you downloaded
newton-dynamics-350914d01b74f74136240a6ba5c81f2356d23ffe

I made some changes that cause the crash, there aren't too many and I do not think is the changes to fix the servo joints, it must be the change to support the vehicle library
so if you can list the id of the version them we can compare by inspection and see what could be the cause.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby blackbird_dream » Thu Oct 11, 2018 2:54 pm

I propose to identify what is the cause of the crash by deleting components til it doesn't crash anymore.
1st thing, I observed it crashed when the vehicle stops, i.e. as if the crash occured when the objects freeze. When the truck is still moving it doesn't crash.
Then I can test other sdk.
Don't you think the crash can come from the unity plugin ?
I'd be glad if you can tell me the way to build a debug version of the sdk that may be used in unity also.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 3:48 pm

to make a debug build, you just select the debug configuartion when building the new to ask and when building the unityplugin.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: strong impulses when actuating joints

Postby Julio Jerez » Thu Oct 11, 2018 4:16 pm

Oh I thought the crash was on start, but you say it run for a while then is crashes.
Maybe is the same issue people are reporting to me in private, some how it seem and object is been released more than one, or something like that.
It quite possible is related to the Plug in glue code,
here is one such bug issue.
I don't know how to use NewtonWorld with my Unity Project using multiple scenes.

Currently, I'm loading it at the beginning and never destroy it. Each time a NewtonBody is created, I added him to NewtonWorld using InitRigidbody.

But when I try to unload every NewtonBody (by calling Destroy for each GameObject or Destroy only for the component), I frequently received a crash with this :
Code: Select all
0x00007FFFA1D415BC (NewtonWrapper) SWIGRegisterExceptionCallbacks_NewtonWrapper
  ERROR: SymGetSymFromAddr64, GetLastError: 'Tentative d’accès à une adresse non valide.' (Address: 00007FFFA1C62AF4)
0x00007FFFA1C62AF4 (NewtonWrapper)
0x000000005F47BC24 (Mono JIT Code) (wrapper managed-to-native) NewtonWrapperPINVOKE:delete_dNewtonCollisionBox (System.Runtime.InteropServices.HandleRef)
0x000000005F47B8B3 (Mono JIT Code) dNewtonCollisionBox:Dispose ()
0x000000005F52EEFA (Mono JIT Code) NewtonBodyCollision:Destroy ()
0x000000005F52E863 (Mono JIT Code) NewtonBody:DestroyRigidBody ()
0x000000005F52E32C (Mono JIT Code) NewtonBody:OnDestroy ()
I supposed that a collider is destroyed before the NewtonBody but I tried a lot of things and never succeed to have no crash.
Please can you help me ?


if you manage to get a debug build I expect to see some trace stack lie the on that bug report post.

I get these messages from time to time from people from the Unity forum who are afraid to make public they are trying the newton plugin and when they run into these citations they ask me in private. It is a self fulfilling problem, the bug do not get fixed because no one is aware of the problem as a result people move on thinking it is the Newton engine problem. which could be but we never get to find out.
They expect me to be an expert on everything and I am not, I know very little of C sharp and Unity.
The way this problems can get resolved is if people vent them publically, but they are so afraid of the wrath of the unity user base that they never mention anything at all because the moment the mention anything an army of trolls who's only interest other engines derail the issue.

In the Unity forum there is not a single post of anyone mentioning they try the engine, it is as if they plugin do not exists, and I now of a least 7 different people how are using it in private.
It frustrates me a great deal.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron