Struttura modello

Si tratta di un file .sdf (xml) che parte con un tag <model> (segue esempio)

http://sdformat.org/spec?ver=1.5&elem=collision#surface_friction

Domanda: esiste un software Model Editor nella versione 6 di Gazebo?

un model è composto da link che sono congiunti da join:

Un link figlio può essere specificato usando il nome del modello come “namespace” <child>hokuyo::pezzo</child>

Usare <include> dentro un file .sdf permette di aggiungere parti esterne (esistenti), come un sensore laser (hokuyo)

<?xml version='1.0'?>
<sdf version="1.4">
<model name="my_model">
  <pose>0 0 0.5 0 0 0</pose>
  <static>true</static>        <!--trip -->
    <link name="link">
      <inertial>
        <mass>1.0</mass>
        <inertia> <!-- interias are tricky to compute -->
          <!-- http://answers.gazebosim.org/question/4372/the-inertia-matrix-explained/ -->
          <ixx>0.083</ixx>       <!-- for a box: ixx = 0.083 * mass * (y*y + z*z) -->
          <ixy>0.0</ixy>         <!-- for a box: ixy = 0 -->
          <ixz>0.0</ixz>         <!-- for a box: ixz = 0 -->
          <iyy>0.083</iyy>       <!-- for a box: iyy = 0.083 * mass * (x*x + z*z) -->
          <iyz>0.0</iyz>         <!-- for a box: iyz = 0 -->
          <izz>0.083</izz>       <!-- for a box: izz = 0.083 * mass * (x*x + y*y) -->
        </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>