ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I use Blender, an open-source 3D modelling and animation program, to create my terrains. For example, you could try this tutorial to get you started. There is also the option to use the sculpt tool to create terrains. You can also use Blender to create other meshes.

Once I create my terrain, I then export the terrain to Collada 1.4 (.dae) using the built-in Blender Collada exporter. This format is readable by Gazebo.

Finally, to get the terrain into Gazebo, I copy the .dae file to my Gazebo "models" directory (see below). I then add the terrain to the .world file so that it is guaranteed to be static.

  <model:physical name="hill">
   <xyz>5.0 -5.0 0.1</xyz>
   <rpy>0 0 0</rpy>
   <static>true</static>
   <body:trimesh name="hill">
      <geom:trimesh name="hill">
        <scale>1.0 1.0 1.0</scale>
        <mesh>ground_profile_test.dae</mesh>
        <visual>
           <scale>1.0 1.0 1.0</scale>
           <mesh>ground_profile_test.dae</mesh>
        </visual>
      </geom:trimesh>
  </body:trimesh>
 </model:physical>

NOTE: You must configure your Gazebo media paths correctly. See here.