gazebo heightmap rendering weird
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.
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.