the way of loading models into simulation
1\ programmatically (code)
2\ the GUI
This document describes
Gazebo's model directory struct,
the necessary files within a model directory.
In Gazebo, models define
1\ a physics entity(object) with dynamic, kinematic, and visual properties (performance).
2\ have one or more plugins, which effect the model's behavior.
A database to store and maintain models available for use within simulation.
The database:
git clone https://github.com/osrf/gazebo_models
Model Database Structure
A root of a model database
1. contains one directory for each model,
1.1 has a 'model.config' file
that contains meta data about the model.
1.2 contains the SDF for the model
1.3 contains any materials, meshes and plugins.
2. a 'database.config' which stores information about the model datebase.
as follows (only one model called 'model_1'):
Database:
database.config
model_1: a directory for model_1
model.config
model.sdf
model.sdf.erb
meshes:
materials
plugins: A directory for plugin source and header files.
Database:
database.config
Meta data about the database. This populated automatically from CMakeLists.txt.
This file contains license information for
the models,
a name for database,
a list of all the valid models.
A directory full of models on your local computer does not need a 'database.config' file
model_1: a directory for model_1
model.config: Meta data about model_1 (must)
model.sdf: SDF description of the model
model.sdf.erb:
<-------------optional directory below------------>
meshes: A directory for all COLLADA (collada) and/or STL files.
materials: A directory which should only contain the textures and scripts subdirectories.
textures: A directory for image files(jpg, png, etc)
scripts: A directory for OGRE material scripts.
plugins: A directory for plugin source and header files.
Model config
<?xml version="1.0"?>
<model>
<!-- required:
<name>
<version> not the version of sdf that model uses.
<sdf> a sdf or urdf file
version attribute indicates what sdf version the file use, and is not required for URDFs
<author> and <name> and <email>
<description>
-->
<name>My Model name</name>
<version>1.0</version>
<sdf version='1.5'>model.sdf</sdf>
<author>
<name>My name</name>
<email>name@email.address</email>
</author>
<!--
what the model is(e.g., robot, table, cup)
what the plugins do (functionality of the model)
-->
<description>
A description of the model
</description>
<!--
<depend> optional
<model>
<uri>
<version>
-->
</model>
the SDF website
http://sdformat.org/
Make your model SDF file
<?xml version='1.0'?>
<sdf version='1.4'>
<model name="my_model">
<pose>0 0 0.5 0 0 0</pose>
<static>true</static>
<link name="link">
<inertial>
<mass>1.0</mass>
<inertia>
<ixx>0.083</ixx>
<ixy>0.0</ixy>
<ixz>0.0</ixz>
<iyy>0.083</iyy>
<iyz>0.0</iyz>
<izz>0.083</izz>
</inertia>
</inertial>
<collision name="collision">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</collision>
<visual name="visual">
<geometry>
<box>
<size>1 1 1</size>
</box>
</geometry>
</visual>
</link>
</model>
</sdf>