How to reflect the change of parameters of bounce?
I wanted to simulate motion of bouncing ball. So I changed parameters(restitutioncoefficient, threshold, mindepth, 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?
Asked by Viper on 2017-11-19 10:13:34 UTC
Answers
the height of bounce was not change at all.
Sorry, I think I'm misunderstanding your question. Is the ball:
- Not bouncing
- Bouncing but not losing energy
- 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
Asked by josephcoombe on 2017-11-21 13:59:42 UTC
Comments
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?
Asked by Viper on 2017-11-21 21:43:27 UTC
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?
Asked by josephcoombe on 2017-11-22 10:15:11 UTC
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?
Asked by Viper on 2017-11-23 05:02:33 UTC
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.
Asked by Viper on 2017-11-25 04:00:10 UTC
I found that if the restitution_coefficient and threshold of ground_plane are set as well as the ball, the value of restitution_coefficient affects the bounce motion. (The max_vel under the ode tag is not necessary for gorund_plane.)
Asked by hued on 2020-02-20 03:38:31 UTC
Comments