gazebo heightmap rendering weird

asked 2018-10-29 12:51:23 -0600

zywang gravatar image

updated 2018-10-29 13:29:03 -0600

I was using heightmap of a room layout in gazebo and rviz to visualize the camera view. However, the rendered view is not stable - i.e. the ground keeps flickering and the walls are loaded in a strange manner. image description

I am running Kinetic and my model.sdf looks like this

<?xml version="1.0" ?>
<sdf version="1.5">
    <model name="heightmap">
      <static>true</static>
      <link name="link">
        <collision name="collision">
          <geometry>
            <heightmap>
              <uri>model://maps/map1.png</uri>
              <size>42.5 42.5 5</size>
              <pos>0 0 0</pos>
            </heightmap>
          </geometry>
        </collision>
        <visual name="visual_abcedf">
          <geometry>
            <heightmap>
              <uri>model://maps/map1.png</uri>
              <size>42.5 42.5 5</size>
              <pos>0 0 0</pos>
             <texture>
                <diffuse>file://media/materials/textures/grey.png</diffuse>
                <normal>file://media/materials/textures/flat_normal.png</normal>
                <size>1</size>
         </texture>
            </heightmap>
          </geometry>
        </visual>
      </link>
    </model>
</sdf>

Any help is appreciated.

Update: Turns out that the flickering ground is caused by a conflicting ground plane with the heightmap model. I moved the ground plane up by 0.1 m and it is good.

Still having an issue with the scene not fully loaded in the camera.

edit retag flag offensive close merge delete