Simulating ropes and pulleys

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Simulating ropes and pulleys

Postby ropeguy » Wed Apr 01, 2009 1:47 pm

I need to simulate a rope and pulley system with these features:

    The rope can collide with other objects, and the collision affects the object and the rope (the rope is deflected)
    The rope can go around a pulley, and friction between the rope and pulley causes the pulley wheel to rotate
    The ends of the rope are attached to moving objects
    The rope needs to accurately represent the behaviour of a real rope or cable, being stiff, but having some elasticity
    The rope, when not under tension, needs to hang in a catenary (so the rope has mass)
    The load can be quite heavy (several thousand kilograms, or tons)
    The rope should be able to transmit torsion (to prevent spinning round of attached loads)
    The rope should be able to rest on a surface, e.g. coiled up / in a pile.

See the attached picture (the embedded rope over pulley pic came from http://www.es3inc.com/mechanics/compmodels.php)

I suspect Bullet will not be able to handle the rope physics (but correct me if I'm wrong!), so I am thinking of creating my own rope physics. This means that Newton will need to handle everything else, that is detect the rope-object collisions and provide the collision forces for me. And it will need to integrate the equations of motion of the non-rope objects (such as the load) as Newton will not know what the rope tensions are being applied to the load.

In short, Newton would need to detect collisions, provide collision forces (or impulses) and integrate the motions of the objects to which the ropes are attached.

Is this approach possible using Newton?

======================================

On another topic, from Newton wiki:

NewtonConvexCollisionCalculateInertialMatrix :
Calculate the three principal axis and the the values of the inertia matrix of a convex collision objects

But the principle axes may not be aligned with the object geometric axes (they will be rotated) - is this a problem?

==============================

Does Newton suffer from instabilities due to large mass ratios? If so, how big a ratio can one get away with?
Attachments
Cable and pulley.jpg
Cable and pulley simulation
Cable and pulley.jpg (25.36 KiB) Viewed 5388 times
ropeguy
 
Posts: 8
Joined: Wed Apr 01, 2009 1:11 pm

Re: Simulating ropes and pulleys

Postby ropeguy » Wed Apr 01, 2009 4:13 pm

Some examples of the kind of thing I'm trying to do:

http://www.youtube.com/watch?v=ig55mOMTQDc

http://www.youtube.com/watch?v=2w3mYthp1RI&feature=related
Rope & pulley appears at about 45 seconds in. Actually, this last video is an impressive demo of sketchyPhysics, which uses the Newton engine.


Here's another:
http://www.youtube.com/watch?v=Fjj_ww7Vnuc&feature=related
(althogh the rope winding didn't work too well)
ropeguy
 
Posts: 8
Joined: Wed Apr 01, 2009 1:11 pm

Re: Simulating ropes and pulleys

Postby agi_shi » Wed Apr 01, 2009 9:34 pm

The easiest way to do this would be to connect many boxes, cylinders, or convex hulls by ball-and-socket joints. Make sure you download the 2.0 public beta, one of the SDK demos has this basic idea implemented.
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Re: Simulating ropes and pulleys

Postby ropeguy » Thu Apr 02, 2009 8:33 am

Yes, I have looked at the Custom Joints demo - but if you pull on the rope, it stretches a lot and behaves like an elastic band. A model based on jointed segments is indeed what I need, but needs to be made much stiffer without becoming unstable. Looking at the code, the rope uses a default material - I assume this is what gives the rope its excessive elasticity - is that correct?
ropeguy
 
Posts: 8
Joined: Wed Apr 01, 2009 1:11 pm

Re: Simulating ropes and pulleys

Postby agi_shi » Thu Apr 02, 2009 3:40 pm

ropeguy wrote:Yes, I have looked at the Custom Joints demo - but if you pull on the rope, it stretches a lot and behaves like an elastic band. A model based on jointed segments is indeed what I need, but needs to be made much stiffer without becoming unstable. Looking at the code, the rope uses a default material - I assume this is what gives the rope its excessive elasticity - is that correct?

I am not 100% sure of how stiff the joints may be made - I suggest waiting for a response from Julio on this.
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Re: Simulating ropes and pulleys

Postby hiramajo » Fri Apr 17, 2009 8:26 pm

You can set the joint stifness to 1 (max)
If you get unstable joints try to increase the moment of inertia of the connected bodys
hiramajo
 
Posts: 2
Joined: Thu Nov 29, 2007 5:53 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests