Gazebo | Ignition | Community
Ask Your Question

Simple way to build 3D mountain world

asked 2014-12-04 12:43:24 -0500

green96 gravatar image

updated 2014-12-04 16:26:49 -0500


could you tell me what is the best and the easiest way to build 3D mouintain world in Gazebo? I would like to simulate quadrocopter and I am going to import 3D terrain or 3D model.

I checked this topic but it only works with Gazebo 3.0 and unfortunately I use Gazebo 2.2, correct me if I am wrong, it will not work with Gazebo 2.2 or on this site is mistake?

I have also found old topics and read that someone use heightmap terrain.

Is there any tutorial how to do it?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2014-12-04 17:02:03 -0500

Carlos Agüero gravatar image

I confirm you that Gazebo 2.2 doesn't have DEM support. It started in Gazebo 3.0. You have a few options:

  • Implement the terrain using heightmaps. Here you have an old tutorial that might be useful. Also, you can take a look at the heightmaps that we created for the VRC. Here you can see an example.
  • Install a newer Gazebo version. Take a look at this tutorial because maybe it's not so difficult to update your Gazebo and you will be able to use DEMs.
edit flag offensive delete link more


I am using ROS so, I have to stay with Gazebo 2.2. Thanks for this wiki tutorial but I found sth simmilar before : ) Maybe it should be posted also on this wiki, it is better than only text version.

I am a little bit confused because here

I found info that it will work with version 2.2.2. So what is the answer?

green96 gravatar imagegreen96 ( 2014-12-04 18:25:14 -0500 )edit

answered 2014-12-04 18:43:30 -0500

Carlos Agüero gravatar image

The heightmap video tutorial is even better! That's a good resource too.

You can use newer versions of Gazebo in ROS. Read this tutorial.

I mentioned in the other thread that you shouldn't use 2.2.2 if you want to use DEMs. You have to use a newer version compiled from sources.

edit flag offensive delete link more


I am using tum_simulator with Gazebo and I am worrying that when I install version from source something go wrong and I don't want to risk.

green96 gravatar imagegreen96 ( 2014-12-04 19:14:26 -0500 )edit

According to this document: which is from 2011, author says that it is possible to download dem file and convert it to heightmap and it will work with Gazebo. I found this tutorials: what do you think about it? it will work?

green96 gravatar imagegreen96 ( 2014-12-04 19:14:26 -0500 )edit

answered 2014-12-04 19:57:29 -0500

Carlos Agüero gravatar image

Sure, if you generate a heightmap it will work. Keep in mind that there are some restrictions about the heightmap shape (square greyscale image, and each side must be 2^n+1 pixels). So, after the conversion you will probably need to tweak your heigthmap to satisfy these restrictions.

edit flag offensive delete link more


Hello! For the others who have similar questions later, you should ensure that you answer the question asked in the post as a single coherent answer. If you'd like to have a dialog, you can use the comment tool. You can also revise you answer as needed, if there are more accurate details for the community. Keep coding!

SL Remy gravatar imageSL Remy ( 2014-12-06 17:59:39 -0500 )edit

Hi, could you tell me: using this tutorial I will generate world but it will be possiblle to add my robot model to this world?

I tried to create terrain from this video tutorial which I posted above but it doesn't work.

Could you also tell me how did you create this world?

green96 gravatar imagegreen96 ( 2014-12-20 10:58:33 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2014-12-04 12:43:24 -0500

Seen: 2,028 times

Last updated: Dec 04 '14