Home | Tutorials | Wiki | Issues
Ask Your Question

How to reflect the change of parameters of bounce?

asked 2017-11-19 09:13:34 -0600

Viper gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-11-21 12:59:42 -0600

updated 2017-11-21 13:39:20 -0600

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


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

2) line 27


You'll want <restitution_coefficient> to be > 0

edit flag offensive delete link 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?

Viper gravatar imageViper ( 2017-11-21 20:43:27 -0600 )edit

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?

josephcoombe gravatar imagejosephcoombe ( 2017-11-22 09:15:11 -0600 )edit

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?

Viper gravatar imageViper ( 2017-11-23 04:02:33 -0600 )edit

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.

Viper gravatar imageViper ( 2017-11-25 03:00:10 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-11-19 09:13:34 -0600

Seen: 296 times

Last updated: Nov 21 '17