Collision force too big

Typically: "How do I... ", "How can I... " questions
Post Reply
KKW
Posts: 8
Joined: 03 Feb 2021, 13:04

Collision force too big

Post by KKW »

Hi,

I am doing the interaction between a cylinder shape tool and a rope (built by cylinder shape segments and sphere as joint),
Image
when they collide, the tool is bounced away, i also print out the collision force using sim.getContactInfo in sysCall_actuation() of the non thread child script, which is bigger than 1000N.

I want to stop the overreacted collision, if it is possible to cut off the force for the tool?
or at the same time add a force negative to the collision force to cancel out the collision reaction for the tool, but keep the rope still?

The model file can be downloaded at https://filebin.net/0ly6pdl2tlgaji8w

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

Re: Collision force too big

Post by coppelia »

Hello,

if we look at the simulation speed, your tool is moving at a very high speed. That is probably the reason for the strong reaction force.
I see three things that you can do (also a combination of all 3):
  • move your tool at a reduced speed
  • add damping to the rope elements and/or the tool (e.g. with ODE you have the Linear/Angular damping property, in the material dialog)
  • you can try to also add a drag to the rope elements and/or the tool, which probably has a similar effect as the damping above. You'd use sim.getVelocity and sim.addForce and/or sim.addForceAndTorque.
Cheers

KKW
Posts: 8
Joined: 03 Feb 2021, 13:04

Re: Collision force too big

Post by KKW »

Hi coppelia,

thanks for the suggestion, i have tried the first two, speed from 1 to 0.1, add linear and angular damp for segments and joints

however, the result is still not ideal, the joints can't hold the segments and break, the tool was still bounced away but with smaller reaction
Image

I also reduced two ropes to one rope, kept the low speed and ode damp, the tool hasn't be bounced away, but the rope also broke down
Image
in the both models when there is no collision, the rope would not dramatically move, so the ode damp does help

but based on 2 images i gave up the 3rd attempt for adding the force, since it can't help the rope part.

Is there any thing i can do to make the collision for the rope more real? Or I should give up to build a dynamic simulation for rope?

scene file for the first image: https://filebin.net/xfenhhv5528lo21f
scene file for the second image: https://filebin.net/1tn04wtw4mxmo1uq

Best,
KKW

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

Re: Collision force too big

Post by coppelia »

Maybe there is an alternative way to reach what you are trying to do. What is the purpose of the rope?

Cheers

KKW
Posts: 8
Joined: 03 Feb 2021, 13:04

Re: Collision force too big

Post by KKW »

Hi coppelia,

thanks for your reply, always bring me hope

i want to do a surgery simulation, the rope is intent to mimic the 2 arteries around the liver, they would be pushed away by the tool. Since coppeliaSim can't simulate the soft tissue, I want to use a rope to find a possible approximation to it by ignoring the elasticity of the artery.

Best,
KKW

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

Re: Collision force too big

Post by coppelia »

I think in order to mimic arteries, you really have to use a rope-like item. Try to switch to another dynamics configuration mode (accurate, very accurate, etc.) and try to also adjust the engine general settings.

Additionally, you can always try to emulate soft items by applying external forces to your tool, e.g. at 3-6 specific locations, via sim.addForce. Using it from within a dynamics callback function would make most sense (but would additionally slow down things)

Cheers

Post Reply