problems with heightmap and map

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

problems with heightmap and map

ximengzhu
Hello all,
I'm trying to use the heightMap but doesn't work. I get the message:

creating /tmp/gazebo-paolo-0/graphics3d.default 112 1629744
terminate called after throwing an instance of 'Ogre::InvalidParametersException'
  what():  OGRE EXCEPTION(2:InvalidParametersException): World geometry is not supported by the generic SceneManager. in SceneManager::setWorldGeometry at OgreSceneManager.cpp (line 1423)
Aborted

My OGRE is 1.6.2 and well installed, and gazebo svn.
I use the following tags in the world file

  <model:physical name="terrain_model">
    <body:heightmap name ="terrain_body">
      <geom:heightmap name="terrain_geom">
        <image>../terrains/terrain.png</image>
        <worldTexture>terrain_texture.jpg</worldTexture>
        <detailTexture>terrain_detail.jpg</detailTexture>
        <size>1025 1025 10</size>
      </geom:heightmap>
    </body:heightmap>
  </model:physical>

were ../terrains/terrain.png is a copy of the terrain.png file of the examples, put in the right folder.
Any Idea?

Moreover, I'm trying to use a simple map:

  <model:physical name="map">
    <xyz>0 0 0</xyz>
    <static>true</static>
    <body:map name="map_body">
      <geom:map name="map_geom">
        <image>terrain.png</image>
        <threshold>200</threshold>
        <granularity>2</granularity>
        <negative>false</negative>
        <scale>0.1</scale>
        <material>Gazebo/Rocky</material>
      </geom:map>
    </body:map>
  </model:physical>

but it seems to me that the map doesn't provide a 3d representation of the png image but only its extrusion with a certain threshold on the darkness of a point to consider the point wall or nothing.
Is this correct?

Thank in advance,
XimengZhu