# How to reflect the change of parameters of bounce? I wanted to simulate motion of bouncing ball. So I changed parameters(restitution_coefficient, threshold, min_depth, and so on)in world file(SDF).

But in my simulation, the motion of a ball was strange. In spite of changing restitution_coefficient, the height of bounce was not change at all.

I researched the cause, but I couldn't find.

Here(https://github.com/VicViperT301/for-Jacob/blob/master/test.world) is my world file.

Does anyone know the cause?

edit retag close merge delete

Sort by » oldest newest most voted the height of bounce was not change at all.

Sorry, I think I'm misunderstanding your question. Is the ball:

1. Not bouncing
2. Bouncing but not losing energy
3. Bouncing... but the initial bounce height is unaffected by restitution_coefficient

I'm assuming the answer is 3 (correct me if I'm confused).

Have you tried increasing max_vel to 10-20 m/s? Setting max_vel too low (default value is 0.01 m/s) might be the cause.

This Gazebo answer on changing bounce properties may be useful to you.

edit: I glanced at your .world file. Couple things I noticed:
1) lines 31-32

 <mu>100000</mu>
<mu2>-1000</mu2>


Set <mu> and <mu2> to more reasonable (& positive values) like 1.0 and 1.0.

2) line 27

 <restitution_coefficient>0</restitution_coefficient>


You'll want <restitution_coefficient> to be > 0

more

Thank you. As you said, I changed mu, max_vel, restitution_coefficient. But the motion of the ball was sometimes strange. When the ball dropped from a certain height, the simulation was correct, but when the ball dropped from different height, the ball sometimes didn't bounce or even if it bounced, the height didn't match calculation.(Of course I set restitution_coefficient in positive value.) Would you tell me if you have more information?

The other thing that pops into mind is increasing the number of physics solver iterations. What were the heights where it worked, where it didn't bounce, and where it bounced (but not to the right height)? Is there a pattern?

Sorry, I don't have any idea, but I think it isn't pattern. And more, when restitution_coefficient was zero, the ball bounced. Is the accuracy of bound simulation in gazebo very low? In other words, did computation error expand continuously while simulation was running?

1

Thanks to your help, I resolve this problem. The value of restitution_coefficient doesn't affect the motion of the ball. When using ode solver, only the value of components below ode tag appears to affect the motion. Any way, thank you very much for answering my question.