Generating Heightmap on Gazebo 2.2
I tried generating heightmap to model a terrain. Below is a sample terrain map generated using Gimp (129 x 129) (alpha channel removed).
However I could get only a part of the terrain getting generated.
My model.sdf
<?xml version="1.0" ?>
<sdf version="1.4">
<model name="heightmap">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<heightmap>
<uri>model://heightmap/materials/textures/heightmap3.png</uri>
<size>1 1 1</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://heightmap/materials/textures/heightmap3.png</uri>
<size>1 1 1</size>
<pos>0 0 0</pos>
</heightmap>
</geometry>
</visual>
</link>
</model>
</sdf>
Asked by webvenky on 2016-06-17 00:10:15 UTC
Comments
While, I won't claim to be all that good at Gazebo, I had this same problem today. I was trying to follow this tutorial: https://vimeo.com/58409707 . However, I got the exact same error that you did where only part of the terrain was showing and I got a Mesh error. What I found to fix this was to make this file a .world file instead of a .sdf file. (I then used a roslaunch file to launch it, but you could launch it probably without a roslaunch file.)
Asked by bb on 2016-09-07 19:11:01 UTC
Does this problem also exist for you on Gazebo 7?
Asked by nkoenig on 2016-09-08 09:53:51 UTC
@bb Yeah, opening it as a world file solves the issue in Gazebo 2.2. Thanks.
Asked by webvenky on 2016-09-08 10:20:57 UTC