Gazebo Media Library

This pages describes how to use the models, textures, materials, vertex and shaders programs provided by Gazebo.

Gazebo Media Library

When Gazebo is downloaded, in the root sources document a Media/ directory can be seen. Let's examine its contents:

Media/ --- fonts --- materials --- models --- sets

The first tree directories are called the Gazebo Media Library. The fouth directory will be reviewed in the next section.

The Gazebo Media Library is a collection of useful resources for a robotics simulation. These resources are fonts, vertex programs, shaders programs, material scripts, textures and models. All these resources have a similar license to the one of Gazebo sources and are supposed to be stable as long as Gazebo API is stable. This means that when Gazebo 0.8 comes out, no renames or deletions of that resources should be permitted in the stable branch. Adding new resources is permited though.

Several models (to know more about models refer to tutorial_models) and worlds use the above resources to make more appealing and realistic models, take a look to the worlds and models provided under the worlds/ directory in your sources.


The fouth directory is called sets. Inside that directory there are several directories, each of them have a distintive name (pioneer2at for instance). The rationale is that several models and textures go pretty well together and they will be almost always used thus. For instance, the Pioneer2at robot model will almost always go with its texture to make a more realistic model (with the same colours) of the original. So all the resources needed for a given model are packed in the same directory. This doesn't mean that you can not make a pink pioneer2at robot, it is easy and we will see how to do it.

Internal structure of sets

Before detailing how to use sets, we'll explain the directory hierarchy or each set. Let's use an example: generalstoreshop. The first thing to notice is that the set and thus the directory name is quite verbose. This is done because we hope the sets directory to grow a lot and descriptive names even harder to type will make it easier to know what a given set is about and to avoid conflicts between different users contributing similar sets.

Looking inside that directory, we find:

-GeneralStoreShop directory -shop.material -sources

Each set will have a similar structure. In the next subsection we'll define its contents.

The resources directory

The name of this directory must be NameOfTheSet, being this name a sufficiently descriptive name. This directory will have all the textures and meshes. The user is free to give them any name he feels it is most convenient. All the resources of this directory can be accessed from the .model and .world files of the world/ directory and from .material or other scripts of this same set or any other set! And in any of these cases these resources are accessed in the exactly the same way (even from its own .material script!) NameOfTheSet/resource.extension.

The material script

This script will be the door to use the textures of this set. The materials defined in this script must have the following organization:


The NameOfTheSet must be the same than the directory of section The resources directory. Each user is totally free to define the NameOfTheMaterial as it prefer most, in Gazebo the connect names with Caps method is used.

The sources directory

This directory has to contain any source (.blender files, .svg files,etc) used to create the mesh and the textures. No set will be complete if the files uses to create the mesh are not provided. Note that other users may want a slightly different version of the model or improve and commit it ( Yes! You are encouraged to do it!). Also, if applicable, a Readme.txt or similar file can be put in this directory to explain the license terms, the authorship or simply where the sources where download from.

Using the sets

Using the resources of the sets is like using any other gazebo resource but with the preffix of the set name : NameOfTheSet. So, if we are using a mesh of a tree model of The Gazebo Media Library named pine we will just use pine.mesh. If we are using a mesh of a tree model of the WinterPineTree set named pine, we will refer to it as WinterPineTree/pine.mesh.

Contributing sets

The sets mechanism lets any Gazebo user to extend its resources without overwritting or conflicting with any resource already provided by Gazebo. It is likely that different users will have in their computer a number of different sets that may be useful for other users. Please contribute! As of this writting (the sets directory just started yesterday), most of the sets are already contributed sets from users. Gazebo with a big library can be much more powerful letting any user build worlds with predefined models with almost no effort.

Currently all the sets are sent to the SVN. So if you have some set available, please let the mailing list know.


Several predefined models can be found in worlds/models directory. They are provided for convenience and they should be an easy way to use building blocks for your world. If you have any .model using the Gazebo Media Library or any set please contribute it.

Last updated Aug 04 2007