Robotics StackExchange | Archived questions

DEM Tutorial Errors - unkown image format

I'm following Gazebo's Digital Elevation Model](http://gazebosim.org/tutorials/?tut=dem) tutorial to the letter, but I get an error when I try to run gazebo /tmp/volcano.world:

Error [Image.cc:98] Unknown image format[/tmp/media/dem/mtsthelens_129.dem]
Error [Image.cc:98] Unknown image format[/tmp/media/dem/mtsthelens_129.dem]
Exception [HeightmapShape.cc:93] Heightmap image size must be square, with a size of 2^n+1

Exception [Server.cc:373] Failed to load the World
Heightmap image size must be square, with a size of 2^n+1

Exception [Server.cc:373] Failed to load the World
Heightmap image size must be square, with a size of 2^n+1

Is there something I need to do to allow gazebo to read .dem files?

Asked by nckswt on 2014-11-05 18:07:47 UTC

Comments

@carlos-aguero

Asked by scpeters on 2014-11-06 02:11:19 UTC

Answers

Could you tell us the Linux version that you are using? Also, are you using a deb package or you have a Gazebo version compiled from sources? It seems for your tag that you're using Gazebo 2.2.2 but you should compile Gazebo from sources for using DEMs.

I tried in Gazebo Trusty compiled from sources and seems to work.

Asked by Carlos Agüero on 2014-11-07 20:06:52 UTC

Comments

Did you manage to solve this issue?

Asked by Carlos Agüero on 2014-12-02 16:17:57 UTC

Comments

I've had exactly the same problem, Gazebo seems not to recognize DEM files (Unknown image format error message), I've tried both mtsthelensbefore.dem and mtsthelensafter.dem. So, I'm stuck trying to run the volcano.world. My linux distro is Ubuntu 14.04 LTS and Gazebo 4.0.

Asked by rebecatourinho on 2015-03-02 09:09:43 UTC

Comments

What I found to be the case, is that DEM files are only supported for Gazebo 3.0+. (Which is a problem if you want to use ROS Indigo which seems to work best/only with Gazebo 2.2.6 currently.) However, you can still do elevation models in Gazebo, you just need to do it via heightmaps. This tutorial is a good source for heightmaps in Gazebo https://vimeo.com/58409707 . Heightmaps use .png files that are greyscale and map them to a height - so white/light grey pixels are a higher elevation and dark grey/black pixels are a lower elevation.

Make sure to do all of the steps of the video - (in particular, if you don't remove the alpha layer channel, it won't work in Gazebo).

Asked by bb on 2016-09-23 11:09:03 UTC

Comments