Robot simulation is not working with DEM (elevation) on Gazebo

asked 2021-04-22 06:38:13 -0600

luis.c.santos gravatar image

I am using gazebo 9.0.0 on ubuntu 18.04LTS with ROS melodic. I have created a Digital Elevation Map and created a model to load it on gazebo. So far, this worked. After this, I tried to spawn a robot in the simulated world, and the physics engine seems to not be working. On plain zones of the terrain, the simulation works. However, when the map has some kind of irregularity, the robot just floats in the air:

image description

Here is my mode.sdf file:

  <?xml version="1.0" ?>
<sdf version="1.5">
    <!-- A global light source -->
    <include>
      <uri>model://sun</uri>
    </include>
     <model name="heightmap">
      <static>true</static>
      <link name="link">
        <collision name="collision">
          <geometry>
            <heightmap>
              <uri>model://sogrape/materials/textures/elevation_129.tif</uri>
              <size>40 60 30</size>
              <pos>0 0 0</pos>
            </heightmap>
          </geometry>
        </collision>
        <visual name="visual_abcedf">
          <geometry>
            <heightmap>
              <use_terrain_paging>false</use_terrain_paging>
              <texture>
                <diffuse>file://media/materials/textures/dirt_diffusespecular.png</diffuse>
                <normal>file://media/materials/textures/flat_normal.png</normal>
                <size>1</size>
              </texture>
              <texture>
                <diffuse>file://media/materials/textures/grass_diffusespecular.png</diffuse>
                <normal>file://media/materials/textures/flat_normal.png</normal>
                <size>1</size>
              </texture>
              <texture>
                <diffuse>file://media/materials/textures/fungus_diffusespecular.png</diffuse>
                <normal>file://media/materials/textures/flat_normal.png</normal>
                <size>1</size>
              </texture>
              <blend>
                <min_height>2</min_height>
                <fade_dist>5</fade_dist>
              </blend>
              <blend>
                <min_height>4</min_height>
                <fade_dist>5</fade_dist>
              </blend>
              <uri>model://sogrape/materials/textures/elevation_129.tif</uri>
              <size>40 60 30</size>
              <pos>0 0 0</pos>
            </heightmap>
          </geometry>
        </visual>
    <physics type='bullet'>
      <max_step_size>0.01</max_step_size>
      <real_time_factor>1</real_time_factor>
      <real_time_update_rate>0</real_time_update_rate>
      <gravity>0 0 -9.9</gravity>
    </physics>
      </link>
    </model>
</sdf>

I have tried to change the physics (from ode to bullet and simbody) system without success. What else can I do?

edit retag flag offensive close merge delete

Comments

Hi did you already find a solution for this problem?

Hawkinator gravatar imageHawkinator ( 2021-10-05 08:26:53 -0600 )edit