Gazebo | Ignition | Community
Ask Your Question
0

Max_vel parameter doesn't work as expected [closed]

asked 2022-06-02 06:18:13 -0500

amayorga27 gravatar image

updated 2022-06-02 10:49:02 -0500

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>
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by amayorga27
close date 2022-06-07 02:18:37.126595

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-06-07 02:17:45 -0500

amayorga27 gravatar image

updated 2022-06-09 05:55:28 -0500

After playing with the code I found the problem. The flag type in solver shouldn't be there.

<solver>

<type> world </type>

</solver>

After commenting this lines, the exercise works as expected.

edit flag offensive delete link more
0

answered 2022-06-04 07:49:26 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

This tutorial is about how to choose or tune physics related parameters, mainly focused on the physics parameters in Open Dynamics EngineI haven't tried 192.168.l00.1 messing with the min_depth or max_vel parameters yet, ... The fdir1 doesn't work the way it is described at Gazebo help section. Hi, I am new working with Maxwell (2 days). ... I request to show the current path the coil doesn't exhibit the expected current behavior.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-06-02 06:18:13 -0500

Seen: 145 times

Last updated: Jun 09 '22