Gazebo Diary – Vol. 2 (Integration of SDF editor)

Binnur Görer · December 9, 2013

In Gazebo simulator, Simulation Description Format (SDF) defines the world model of the simulation. It describes the objects in the simulation with their physical and visual properties. SDF is an XML-based description language, so that we can change the world description by using a simple text editor. With Gazebo SDF Editor, we aim to change the description of the simulation while simulation is running. I added the SDF editor which shows the sdf file of the current world model which is loaded from the memory. It is shown in the below image.

sdf_editor

 

I added SDF editor under Edit Tab. When you click on this, it is opened above the rendering window. Normally, the sdf files of each model element are stored under home/gazebo folder.  However, these sdf files can be different from the ones stored in the memory while the simulation is running. Since some properties of the model elements can be changed. Therefore, the sdf file shown in the editor is loaded from the memory. It is easy to get the world model by sending a request to the Gazebo server.

In order to integrate the sdf editor to GUI, I replicate the job done for building editor. I added simple plain text editor from QT and a small palette which contains update and close buttons. The below picture shows the building editor of Gazebo which allows you create an entity in the simulation world bu using the graphical interface. My aim is to present an editor which allows you directly change the simulator model file and show the result instantaneously in the rendering window as it is done with building editor. However, sdf editor allows to create detailed models on every entity in the world not only wall, window, door and stairs.

 

building_editor

Twitter, Facebook