Novodex Pendulum simulation instability

1b28d9c9e5171f60c303e9e78f56b3c1
0
AGPX 101 Nov 14, 2005 at 00:50

Hello,

I have tried to implement a pendulum with the Novodex 2.2 SDK, but I have a strange instability problem.
I have picked the Lesson 301 (the Rope) and made the following modification:

1) The top piece of the rope is made kinematic (so that the rope don’t falldown anymore).
2) I have increased the density of the last piece of the rope (to avoid to append other objects, for the moment, keeping the modification minimal).
3) I have increased the force strength.

The result is strange: every joint extend itself (like if it was a spring). I have replace the CreateRopeSphericalJoint with the simpler CreateSphericalJoint, but nothing change.
Moreover, when you try to apply the force the simulation become totally unstable. All the joints become crazy with no reason. If you sensibly decrease the density of the last piece of rope (making it much more light), the situation become better, but the program still don’t be stable.
The rope, initially, stretch itself as if it are elastic. But there no spring at all.
I have tried to setup the joint projection. This make the stretching less evident, but the simulation still doesn’t work.
The Novodex come with a demo “Breakable Joints” that show 3 pendulums. Whatever force you apply to the pendulum don’t make the simulation unstable like mine. There are no source for this demo, so I don’t understant what kinda of joints are used and how they are setup.
I don’t understand this problem. How I can get rid of this instability? Why the rope exposes this “spring” behaviour? :sad:

It seems like that the spherical joint is stretched. Please help me. Thanks in advance.

Best regards,

  • AGPX

P.S.: I have uploaded the modified version at the following address:

http://rocjoe.freefronthost.com/Lesson301.zip (about 32 Kb).

It actually contains only the Lesson301.exe and require the Novodex engine installed (yes, with no virus, trojan, spyware, adware, ecc…).

Take a look of this strange behaviour.

7 Replies

Please log in or register to post a reply.

87e614b8b888bb2c4485c1ac16d8c779
0
moe 101 Nov 14, 2005 at 10:14

Normally Novodex is quite stable and instability lies within your implementation. Sorry that’s not very helpful…

Have you tried to ask the same question in the Novodex forum? They are usually helpful only you might have to wait a little until you get a reply since they are also very busy working on their SDK. But I suggest giving it a try.

E54629ba7ececd78c241651d26cb8903
0
CobraLionz 101 Nov 14, 2005 at 19:27

OK you got a lot of nerve asking for help and not even showing the source code and instead ask us to download a shady executable file. If you think your source code is so great that none of us could ever write on our own, then you are obviously great enough to figure out your own problem yourself.

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Nov 14, 2005 at 20:36

Chill out, CobraLionz. There’s no need to get upset. If you’re worried about his executable then just don’t download it.

E54629ba7ececd78c241651d26cb8903
0
CobraLionz 101 Nov 15, 2005 at 05:05

sorry, its a monday.. guess i let it get the best of me

1b28d9c9e5171f60c303e9e78f56b3c1
0
AGPX 101 Nov 16, 2005 at 12:23

Hi,

I haven’t posted the source code because I don’t want to bother you. Instead, the executable show a behaviour that could be happened to somebody.
However, the source code is the Lesson 301 provided with the SDK. With the following modification:

void CreateRope(const NxVec3& pos, const NxReal segHeight, const NxReal segRadius, const int nbSegments, const NxReal density)
{
    int i;

    ropeSegs = new NxActor*[nbSegments];
    ropeLinks = new NxSphericalJoint*[nbSegments-1];

    for (i = 0; i < nbSegments; i++)
    {
        ropeSegs[i] = CreateCapsule(pos + NxVec3(0,i*(2*segRadius+segHeight),0), segHeight, segRadius, (i > 0 ? density : (20.0f * density)));  // Modified
    }

    for (i = 0; i < nbSegments - 1; i++)
    {
        ropeLinks[i] = CreateSphericalJoint(ropeSegs[i], ropeSegs[i+1], pos + NxVec3(0,(i+1)*(2*segRadius+segHeight),0), NxVec3(0,1,0)); 
    }

    ropeSegs[nbSegments - 1]->raiseBodyFlag(NX_BF_KINEMATIC); // Added
}

Basically, I made the last segment kinematic, in order to prevent the rope to falldown.
Lastly, I assign a greater density to the bottommost piece of the rope to emulate a weight. No other modifications.
I see that the library (just like others one), have some difficulty to maintain the constraints (the sequence of spherical joints that link the rope’s pieces), when a modest force are applied (the weight). Actually I’m waiting for the account on the Novodex’s forum, but I believe that a similar problem could be happened easily to other peoples, so I have tried to post my problem here.

1b28d9c9e5171f60c303e9e78f56b3c1
0
AGPX 101 Nov 18, 2005 at 13:29

Hello,

I think that the problem is that the engine can’t easily maintain the constraints. There’s a way to make the constraints more “hard”?

6f0a333c785da81d479a0f58c2ccb203
0
monjardin 102 Nov 18, 2005 at 14:11

Why don’t you try your question in the Novodex forum?
http://novodex.com/forum/

Would a hinge joint with a rod not suit your needs instead of a series of jointed spheres? You wouldn’t run into these joint constraint problems in that case.

Also, a rigid pendulum is not hard to model without a full blown physics engine like Novodex. This is especially true if you keep the angle small (since you can approximate the sine of the angle as the angle).