What are description files and how to create them
This page explains what are description files, why we need them and how to create them. We can distinguish Gazebo .world files that describe the simulated environment, the associated models that are simulated and ROS .scene files that contain information about the collisions.
Note
For convenience sake, you can gather all these files in a folder (or even better a ROS package), like this one.
Gazebo models folder
This folder must contain at least all the objects used to compose a world, defined as SDF files. The minimal directory structure of such a folder is the following: .. code-block:: bash
models +– <model_using_mesh_name> | +– meshes | +– <model_using_mesh_name>.stl | +– model.config | +– model.sdf +– <model_no_mesh_name> | +– model.config | +– model.sdf
Please note that the meshes can also be .dae files, allowing you to add texture. You can find an example of a gazebo models folder here.
Gazebo world files
Gazebo worls allow you to simulate your robot’s environement. It can be either static or contain some dynamics mechanisms. It exists several ways of creating gazebo worlds. We detail here three options.
Using the Gazebo interface
If you want to use the native Gazebo interface, you can follow this tutorial.
Using the Shadow World Generator
We have implemented a software that helps in the process of creating Gazebo world files. All the dependencies are already installed in the container. You just need to follow these instructions.
Manually creating world files
Note
This template is a backbone allowing to create simple (but most of the time sufficient) world files. You can freely adjust the different parameters to better fit your constraints.
If you want to add a sensor with its corresponding model, you can do so in this template. For instance adding a RGB-D sensor such as a kinect, which will already create the ROS topics containing the data.
Scene files
Motion Planning on the left part of your window, add it. Then go in the tab Scene Objects and click on Export As Text. Choose the path to the folder in which you want to save the scene, pick a name and save it. And here is your scene file.