Max_vel parameter doesn't work as expected [closed]
I'm trying to reduce the speed injected in two bodies after they overlapse.
After reading this post, I tried to use the world given in the Constraints parameters but I doesn't seem to work the same way as the video bellow it.
In my case even changing the parameters as they explain them, the output is constantly the same, the ball throws up at a really high speed regardless the max_vel
value.
Here I leave the code I used to test it:
<?xml version="1.0" ?>
<sdf version="1.6">
<world name="default">
<physics type="ode">
<ode>
<solver>
<type>world</type>
</solver>
<constraints>
<contact_max_correcting_vel>0.1</contact_max_correcting_vel>
<contact_surface_layer>0.0001</contact_surface_layer>
</constraints>
</ode>
<max_step_size>0.001</max_step_size>
</physics>
<gravity>0.0 0.0 -9.81</gravity>
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<model name="sphere_1">
<pose>0.0 0.0 1.4 0.0 0.0 0.0</pose>
<link name="link_1">
<visual name="visual_sphere_1">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Red</name>
</script>
</material>
</visual>
<collision name="collision_sphere_1">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
<surface>
<contact>
<ode>
<max_vel>0</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
</model>
<model name="sphere_2">
<pose>0.0 0.0 0.5 0.0 0.0 0.0</pose>
<link name="link_2">
<visual name="visual_sphere_2">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
<material>
<script>
<name>Gazebo/Blue</name>
</script>
</material>
</visual>
<collision name="collision_sphere_2">
<geometry>
<sphere>
<radius>0.5</radius>
</sphere>
</geometry>
<surface>
<contact>
<ode>
<max_vel>0</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
</model>
</world>
</sdf>