# Body falls through the object its placed on, if Kp and Kd parameters are varied.

Hi Everyone,

I'm not sure if this is an ODE question and if it belongs on this forum, but please do redirect me to the right forum if this is the wrong place for this question.

I was trying to model the interaction between two soft-bodies in Gazebo using the ODE physics simulator. In a simple sense, my model is like a rubber ball placed on a soft-sponge (rectangular in shape).

I was tweaking the Kp and Kd parameters(which are within the ODE tags) of the SDF files of both objects to see if I was able to get the right interaction. When I kept the Kd values very low, the rubber ball would simply fall through the sponge to hit the ground (the sponge is suspended in air ), however, if the Kd is very high, the sponge behaves like a rigid body. How can I allow the ball to sink into the sponge, and yet not fall through the sponge?

Thanks! :)

edit retag close merge delete

which Kp and Kd values do you use? t

( 2014-11-18 07:23:21 -0500 )edit

I've tried a bunch of values, but the ones for which the body falls through are close to: Kp = 50, Kd = 0 (for both bodies). For rigid bodies, Kp = 50000, Kd= 5000.

( 2014-11-18 08:33:13 -0500 )edit
1

start from larger values for Kp like 10^7 (you can try even larger) and go lower till you will see a penetration. after that you can add a compatible Kd.

( 2014-11-18 08:40:45 -0500 )edit

( 2014-11-18 09:55:54 -0500 )edit

I see you managed to solve this problem. anyway the small Kd such as Kd=1 worked for me.

( 2014-11-22 06:14:20 -0500 )edit

Sort by » oldest newest most voted

Hi,

you can also play around with the <cfm> and <erp> values for the contact joints. You could try for soft bodies cfm=erp=~1 and kp,kd < 1. I am not sure it will work.

Also take a look at the mud world try running it to see different contact types with the mud objects. This loads the world with the MudPlugin plugin with different parameters for thin mud stiffness = 0.0 and damping = 1.0 for thick stiffness = 0.0 and damping = 10.0.

Here are the stiffness and damping parameters used to compute in the plugin the erp and cfm. However no kp or kd.

Hope this helps, and please update the answer if you manage to figure out how the values are related and what are the actual outcomes.

Cheers, Andrei

more

Hi Andrei, I thought the Kp, Kd and <erp>, <cfm> values were related and so I wasn't tweaking those. But will try your values now. Will definitely update the thread.

( 2014-11-18 08:35:24 -0500 )edit

So here's how I did it. I used Andrei's values above to create a layer of thick sponge. Then I added a layer of very thin mud on top of this layer.

This allowed my body to fall more evenly into the sponge, without falling through the surface.

more