EnableMotor() works in debug_double, falls apart in release

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

EnableMotor() works in debug_double, falls apart in release

Postby misho » Mon Apr 27, 2020 2:35 pm

Hi everyone!

I have put together a mechanical assembly that consists of a main body (spacecraft) and a linkage part that connects spacecraft to a solar panel. This linkage part is connected via a dCustomHinge, and when EnableMotor(...) is applied, the hinge rotates 90 degrees and raises the solar panel. I have assembled this correctly, and it works in debug_double configuration exactly how I want it, but when I compile for release_double, The linkage literally falls apart: There is no crash, but the main body and the rotating part disconnect and start rotating and tumbling about each other.

My code is almost identical to the code in StandardJoints section of the demoSandBox. I have played with several parameters in order to debug it, and it seems like:

Code: Select all
pMotorizedHinge->SetFriction(1.0e1f); // <- no part rotation
pMotorizedHinge->SetFriction(1.0e2f); // <- no part rotation
pMotorizedHinge->SetFriction(1.0e3f); // <- linear translation in local y axis
pMotorizedHinge->SetFriction(1.0e4f); // <- assembly falls apart


Also - the main body and a part that's linked to it are moving at very high (orbital) velocities. I saw some warnings about instability with fast moving bodies so I thought I should mention this. However, everything up till now worked fine (I have large assemblies of bodies linked with hard joints), and as I mentioned, the above rotating part works fine in debug_double configuration.

Any thoughts on what may be causing this, and how to fix it?
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am

Re: EnableMotor() works in debug_double, falls apart in rele

Postby misho » Tue Apr 28, 2020 4:49 pm

Any thoughts on this, anyone?

Here is what's happening: a spacecraft has 4 arrays of foldable solar panels. Each array has a support ("Y" looking part) and 3 solar panels connected in a chain, a total of 16 Newton bodies, all linked to the main spacecraft body.A total of 16 motorized hinges drive the unfolding (deployment) of the solar panels. This is what happens in debug_double configuration (proper behavior):

Image

And this is what happens with the identical code in release_double configuration (the whole assembly falls apart):

Image

It seems as if the parts do not get disconnected, but are still attached to each other, and are driven by EnableMotor(), however, the pivot points get all scrambled, so the parts look like they are tumbling all over.... Looks great if I wanted to animate a collision :wink: but that's not what I'm after here :roll:

Any idea what's going on? As per my other post, I noticed a bit of performance and instability problems in the newest build - if there are some features being worked on or addressed, I can wait till things stabilize and work on other things...
Misho Katulic
CTO, FSX SpacePort
TerraBuilder
www.terrabuilder.com
misho
 
Posts: 673
Joined: Tue May 04, 2010 10:13 am


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 17 guests