2014-04-10
The second part in our series of posts about new features in Gazebo 3.0 covers Digital Elevation Models and terrain paging.
A Digital Elevation Model (DEM) is a 3D representation of a terrain's surface that does not include any objects like buildings or vegetation.
The main motivation to support DEMs in Gazebo is to be able to simulate realistic terrain. For example, rescue or agriculture applications might be interested in testing their robot behaviors using a simulated terrain that matches the real world.
Organizations such as Global Land Cover Facility maintains a high-resolution digital topographic database of Earth. It's possible to search and download a specific region in any available DEM database and load it into Gazebo.
Gazebo 3.0 is able to load a DEM terrain in any of the near 100 different formats supported by GDAL, the underlying library that we are using to manage the terrains. Currently, Gazebo supports the option of loading the DEM keeping its original dimensions, or re-scaling it using a specific width, height, and elevation.
As an example, you can see screenshots of the Canary Islands in Spain and the Mount St. Helens in United States.
A new terrain paging strategy has been implemented in Gazebo. This feature has been partially adapted from the Ogre graphics engine. The terrain is internally split in multiple pieces. Each piece is loaded/unloaded by the rendering engine depending on its distance to the cameras in the scene.
The terrain paging for the rendering engine is an optional feature. A new
The screenshot shows four snapshots of the same scene with the camera user at different distances from the terrain. As you can see, the subterrains are unloaded from the scene while the camera moves away. The distances from the camera at which terrain pages are loaded/unloaded can be parametrized.