# gazebo / doc / tutorial_terrain.html

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 /** \page tutorial_terrain Terrain Tutorial This tutorial will describe how to create and use terrains via heightmaps. The contents of the page include: - \ref tutorial_terrain_image - \ref tutorial_terrain_xml \section tutorial_terrain_overview Overview Gazebo makes use of heightmaps for terrains. Heightmaps are extruded vertically from a 2D image. Therefore no overhangs or tunnels can be formed. IMPORTANT: ODE version 0.8 or less in incompatible with terrains, due to problems with Ray and Heightmap collision detection. If the highest numbered version of ODE is 0.8, then install from their SVN sources. \section tutorial_terrain_image Heightmap Image A heightmap is based on a greyscale image. The image must be square with a width and length of (2^n) + 1. For example an image of size 513x513 is valid, while 512x512 is not. The image you wish to use must be place in Gazebo's Media directory. If you installed Gazebo globally, this would be /usr/local/share/gazebo/Media/matierals/textures. Below is an example image: \image html terrain.png Example Heightmap Image. \section tutorial_terrain_xml Worldfile Syntax A terrain can be used in Gazebo by specifying a heightmap image, texture images, and a size. \verbatim terrain.png terrain_texture.jpg terrain_detail.jpg 1000 1000 10.0 \endverbatim - image : The heightmap image - worldTexture : General texture to apply to the terrain - detailTexture : Texture applied to the terrain when the camera is close - size : Size to make the terrain Currently a terrain cannot be placed at custom coordinates. */