# Physics parameters for a rolling ball

Hey there,

I try to simulate a ball balancing on a plate. Now my problem is that for small plate angles <1° the ball is sliding (not rolling) alongside the plate. Any ideas how to set the gazeo urdf physics paramters to avoid sliding and always force the ball to roll directly and very sensitive?

Here is what I have:

<gazebo reference="ball_link">
<gravity>1</gravity>
<maxVEl>1000</maxVel>
<mu1>0.005</mu1>
<mu2>0.005</mu2>
<fdir1>0 0 0</fdir1>
<kp>1e+20</kp>
<kd>1.0</kd>
<maxContacts>1</maxContacts>
</gazebo>


Well setting maxContacts to only 1 was quite helpfull. But still my ball is sliding and not rolling....

1) Should I increase the mu1,mu2 to achieve that?

2) My plate should have the same mu1 and mu2 right?

3) Is fdir1 = 0 0 0 correct?

4) Can I set physics parameters during the gazebo simulation (like the mu1, mu2 parameters)

5) I tried to set the mu1 and mu2 high(100) and also the maxContacts to 100 but still the ball is sliding on the plate and not holding still..... -> maybe I need more weight?

edit retag close merge delete

Sort by » oldest newest most voted

1) Should I increase the mu1,mu2 to achieve that?

Sure, try setting mu1, mu2 to 0.1-1 respectively (0.005 is really small)

2) My plate should have the same mu1 and mu2 right?

Not necessarily - but for this specific example it probably wouldn't hurt.

Generally I try to set friction properties from a table (like this: https://www.engineeringtoolbox.com/fr...) and then tune (maybe a lot) as needed to obtain desired behavior.

3) Is fdir1 = 0 0 0 correct?

I don't think so.

Better to leave it blank and just accept the Gazebo default.

4) Can I set physics parameters during the gazebo simulation (like the mu1, mu2 parameters)

Yes, I think so. These linksmay be a good start:
http://gazebosim.org/tutorials?tut=pr...

5) I tried to set the mu1 and mu2 high(100) and also the maxContacts to 100 but still the ball is sliding on the plate and not holding still..... -> maybe I need more weight?

I recommend adding a small minDepth value, e.g. 0.001-0.005. It's possible that the "sliding" you are observing is just the ball bouncing up and down - losing contact every time. Maybe try reducing maxVel a bit too.

For example:

<gazebo reference="ball_link">
<gravity>1</gravity>
<minDepth>0.001</minDepth>
<maxVel>10</maxVel>
<mu1>1</mu1>
<mu2>1</mu2>
<kp>1e+10</kp>
<kd>1.0</kd>
<maxContacts>10</maxContacts>
</gazebo>

more

## Stats

Asked: 2018-09-10 04:40:01 -0500

Seen: 484 times

Last updated: Sep 11 '18