Rope Simulation

Typically: "How do I... ", "How can I... " questions
Post Reply
vrepUser1
Posts: 10
Joined: 22 Oct 2016, 16:20

Rope Simulation

Post by vrepUser1 »

Hello,
I created a dynamic model of a simple rope. I used spherical joints to model the behaviour of the rope. The upper red sphere is static and the rest is dynamic.

http://www.megafileupload.com/gbfd/SimpleRope.ttm

Image

Three questions:
1. What I have to do if I want to pull the rope by holding the green sphere with mousebutton? I tried it with dummy tip target, but this was not successfull. I think because the jointmodes have to be in IK mode, not in torque/force, but I need the latter.

2. If I want to simulate some elongation of the rope, I think the solution would be something like:
shape -> spherical joint -> shape -> prismatic joint (as spring) -> shape -> spherical joint -> shape -> prismat.... and so on
I also tried to set the prismatic joints in spring damper mode and in closed loop where I only use the propotional part. I tried different settings for spring and damper coeefficients (similiar to the coefficients of the spring damper example), but the rope exploding during simulation.

3. If I touch the rope during simulation e.g. with the cup (see picture) the rope will begin to shake and never stops. What I have to set to avoid this? Some damping parameters or friction coefficients of the joints or mass parameters of the links?

Best regards,
vrepUser1
Last edited by vrepUser1 on 24 Oct 2016, 18:17, edited 1 time in total.

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Rope Simulation

Post by coppelia »

Hello,

your file extracts to an executable, why is that? So I couldn't have a look at it.

About your questions:

1) This is not working because when you manipulate with your mouse an object or model, the object or model is entirely made static, and not interact dynamically in the same way. There is a turnaround you could try: use a larger sphere at the top of the rope. Do not include that sphere in the rope model. Attach a script to that larger sphere: that script should read the sphere's position and apply it to the green sphere.

2) Yes, this is the way to do it properly If you have many rope elements, then the rope will naturally have more elasticity. And yes, the more elements you have, the less stable it becomes. You can try to adjust satability by increasing the mass or inertia for the different elements. See also next point:

3) you should add some damping to your rope elements. You can do this in this dialog.

Cheers

vrepUser1
Posts: 10
Joined: 22 Oct 2016, 16:20

Re: Rope Simulation

Post by vrepUser1 »

Hi,
ok thank you! I will try this.

Sorry for the uploaded file. I just uploaded to the first hoster in google results. I updated it to another hoster. I think it is more reliable.
http://www.megafileupload.com/gbfd/SimpleRope.ttm

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Rope Simulation

Post by coppelia »

Applying point 1) and 3) in my previous post should greatly improve the results.

Cheers

Post Reply