Hard joint gets an offset over time

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Hard joint gets an offset over time

Postby misho » Mon Sep 17, 2018 2:41 pm

BTW, I'm on a July 17 build for my main project (I kept separate the recent sandbox tests) and I'm having trouble building debug_double... I haven't noticed this before since I haven't had a need for Debug version...

Trouble is with custom joints, unresolved externals, here's an example, there are 6 of them:

1>dCustomJoints_d.lib(dCustomJoint.obj) : error LNK2019: unresolved external symbol "public: static void __cdecl dContainersAlloc::operator delete(void *)" (??3dContainersAlloc@@SAXPAX@Z) referenced in function "public: virtual void * __thiscall dTree<class dCustomJoint::dSerializeMetaData *,__int64,32>::`scalar deleting destructor'(unsigned int)" (??_G?$dTree@PAVdSerializeMetaData@dCustomJoint@@_J$0CA@@@UAEPAXI@Z)

No problem building release_double.
Any idea what I'm missing?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby Julio Jerez » Tue Sep 18, 2018 4:33 pm

I don't know I have all configuration compiling.
has you try the CMake build system. that one let you configure the build you want.

give it a try some time, at some point we will move to a CMake only build system and get rid of all hand made projects, is it too tedious to maintain so many of them.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby misho » Fri Sep 21, 2018 12:48 pm

No worries, I should be upgrading to the latest build if it is stable. No, I haven't tried CMake, but sure, I'm willing to give it a go!

Hope you're making the progress on the "hard" hinges!

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby Julio Jerez » Sun Sep 23, 2018 1:13 pm

I am doing on a separate local branch because this can change many things.

I have to take a step back and first update the functions to use the newer vector class, there were many functions that are using the old vector function that work on x, y, z all mixed with newer functions that apply the same operation to all elements x, y, z, w
many of those function are quite old and need to be made consistent.

I have the contact joint converted so far, and now I am ready to go with the joints but
that will be next weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby misho » Sun Sep 23, 2018 1:20 pm

Sounds good, thanks for the update!

Misho
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby misho » Fri Oct 19, 2018 5:47 pm

Hi Julio - any progress on this?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby Julio Jerez » Fri Oct 19, 2018 6:31 pm

Oh I have a fix for this, but I am waiting until I get the vehicle going because this
is a significant interface change, so I am trying it with the vehicle first.
also there has been lot of changes that is better to give some time until the all get settled.
one or two more weekend.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby misho » Fri Oct 19, 2018 6:36 pm

Sounds great!! Thanks!
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby Julio Jerez » Wed Feb 06, 2019 11:58 am

Ok Misho, late but better late than never, this bug is now fixed, I believe

the disconnect when form 5.9 meters to 0.9 or less, it seem still large but that because ther is still one derivative term that is missing, but I am assuming this is zero in almost 95 or high percent of the time.
the term is highly non linear when is large, and it vanish when is small so that is left to the per row penalty.

your case is quite extreme because long objects do not spin that fast precisely for that reason, if they do the disintegrate under their own inrenal centripel acceleration.

please check it out and see if thsi is better for you.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby misho » Wed Feb 06, 2019 2:28 pm

Thanks Julio - I will check it out!

Funny thing is, I thought you already fixed this! You might have had a partial fix, because I noticed things improved a lot since last time we covered this... In any case, I'll check it out more closely!
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: Hard joint gets an offset over time

Postby Julio Jerez » Wed Feb 06, 2019 6:00 pm

as Nietzsche once said. "what do no kill you make you stronger".

I added a test to check at what point the missing derivative start to be relevant and to my surprise pretty soon. so I will added tonight, if it happen to affect other joints too much I can make optional.

It should not affect your stuff so you can just go a head and test it.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby Julio Jerez » Thu Feb 07, 2019 10:05 am

Ok Misho I now added the final term and the joint has numerically zero drift.

the error is 0.035 meters which can only be reduced by either more syb steps, of implicit integration.
Implicit integration is expensive because requires evaluation of the Jacobean at sub step time,
and that required a different framework. Sub step can easily make for that.
but remember you case is extreme, a 0.04 error at 10 rad/sec at 18.0 radius is quite remarkable.
I case you sync before please try again.

I added a complex test to show it off.

also a cool thing is how the payload shift the center of mass of he entire thing, they both have the same mass
dFloat CoreMass = 979452.0f;
dFloat PayloadMass = 979452.0f;

but the payload is very small and at one end of the rocked, I know that is the expected behavior but is cool when seing it really happening. :D
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby Sweenie » Fri Feb 08, 2019 6:02 am

This fixed the joints drifting apart on Demo 6 in the Unity plugin as well. :D
I noticed you started to fix the orientation issue in the plugin since the quaternion component order changed.
It needed to be changed on the C# side as well, I think it should be ok now.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Hard joint gets an offset over time

Postby Julio Jerez » Fri Feb 08, 2019 7:53 am

Oh nice, I was wondering what was wrong with the unity plug in, everything this was whacked, the I saw it was the quay change, but when I made the change on the plugin size, still did not work, and I decided to leave along until you check it out.

Did you get it working?
I still had to fix some joints the joints the do n o t fix all three positional DoD.
Those generate various acceleration that is still neglected. But for the most part all if he going should be much better now. The Coriolis is a small value the can be covered by the joint penalty for drift.

edit: I just tested and indeed it works again. :D
I am going over all the basic joint so that we get that over and expect reliable results every time.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Hard joint gets an offset over time

Postby misho » Fri Feb 08, 2019 4:00 pm

Excellent Julio, I will merge and check out the state of things ASAP!

I sent you a PM message on an unrelated matter, can you please check and respond, if you have any thoughts?

Thanks!
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 14 guests

cron