Ask Your Question
1

Create rough terrain for used in gazebo

asked 2011-11-15 01:35:36 -0500

Maurizio88 gravatar image

updated 2011-11-15 07:03:35 -0500

tfoote gravatar image

hi all, i have to create a world with rough terrain. how shall i do that? somebody can suggest me a good tutorial?

thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-11-15 08:26:49 -0500

DimitriProsser gravatar image

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.

edit flag offensive delete link more

Comments

So the Blender .dae export works as intended for you? I get this if I use the .dae exported from Blender 2.61 directly: http://bit.ly/hills_bl . OTOH, if I just open this in meshlab and save as .dae again, I get this: http://bit.ly/hills_ml (but material info is obviously lost).
Stefan Kohlbrecher gravatar imageStefan Kohlbrecher ( 2012-01-23 08:10:44 -0500 )edit
Oh yes, I've received that error before. The problem comes from Blender > 2.49b. I don't know what's different in the COLLADA exporter, but it doesn't work. Thus, I still use Blender 2.49b. I have a "build" machine to do the exporting, so I can still use 2.6 on my main machine.
DimitriProsser gravatar imageDimitriProsser ( 2012-01-23 08:29:02 -0500 )edit
Ah I see, that at least clears up why I'm having those annoying problems. I'll update my Blender/COLLADA question accordingly. Thanks for the quick and enlightening answer.
Stefan Kohlbrecher gravatar imageStefan Kohlbrecher ( 2012-01-23 09:29:56 -0500 )edit

Are there any other options for rough terrains in Gazebo? The tutorial linked here seems old.

2ROS0 gravatar image2ROS0 ( 2014-12-12 09:02:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-11-15 01:35:36 -0500

Seen: 3,115 times

Last updated: Nov 15 '11