Bounce
Bounce is the rebound or reflection after striking a surface (such as the ground). In the simulation, this is defined by the restitution_coefficient
parameter.
To model bounce in Gazebo, you need to set 3 parameters in the SDF.
restitution_coefficient
[0,1] Where 0 is no bounce, and 1 is pure bouncethreshold
The penetration threshold needed to apply restitution forcemax_vel
The maximum velocity that the restitution force can cause.
A restitution_coefficient
must be set on both collision surfaces. For balls to achieve infinite bounce with the ground in this simulation, the ground was given a restitution_coefficient=1
.
Example code snippet
<link>
...
<collision>
...
<surface>
<bounce>
<restitution_coefficient>1</restitution_coefficient>
<threshold>0</threshold>
</bounce>
<friction>
<ode/>
</friction>
<contact>
<ode>
<max_vel>1000</max_vel>
</ode>
</contact>
</surface>
</collision>
</link>
Comparison
Gazebo | Ignition with restitution coefficient ranging from 1 to 0 in 0.1 increments.
Ignition does not currently model bounce.
Update
Ignition now models bounce!