Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

A Collada or STL file by itself won't give you Gazebo links, you must put each "node" of your mesh into a separate <link> in your model's SDF description.

I recommend you first get familiar with links, joints, collisions and visuals in Gazebo. This tutorial should give you a good idea.

After you've understood those concepts, let's go through an example of creating separate links for each node on a COLLADA mesh.

Let's take the zephyr_delta_wing model as an example.

  1. Open the collada file and look for <node> elements (they should be inside <visual_scene>. This is what they look like for the Zephyr wing:

    <node name="EnvironmentAmbientLight">
      (...)
    </node>
    <node id="node-Wing_Bone" name="Wing_Bone">
      (...)
      <node id="node-Wing" name="Wing">
        (...)
      </node>
      <node id="node-Flap_Left_Bone" name="Flap_Left_Bone">
        (...)
        <node id="node-Flap_Left" name="Flap_Left">
          (...)
        </node>
      </node>
      <node id="node-Flap_Right_Bone" name="Flap_Right_Bone">
        (...)
        <node id="node-Flap_Right" name="Flap_Right">
        </node>
      </node>
      <node id="node-Prop_Bone" name="Prop_Bone">
        (...)
        <node id="node-Prop" name="Propeller">
          (...)
        </node>
      </node>
    </node>
    
  2. On our SDF file, where we reference the COLLADA file, if we don't choose a submesh, all the nodes will be used together. But if we want only one node, we can refer to its name. For example, for the propeller link we have the following:

    <link name="propeller">
      (...)
      <visual name="visual">
        (...)
        <geometry>
          <mesh>
            <uri>model://zephyr_delta_wing/meshes/wing.dae</uri>
            <submesh>
              <name>Propeller</name>
              <center>true</center>
            </submesh>
          </mesh>
        </geometry>
      </visual>
    </link>
    
  3. Note how each link of that model has a different submesh and how they can be moved independently in simulation:

A Collada or STL file by itself won't give you Gazebo links, you must put each "node" of your mesh into a separate <link> in your model's SDF description.

I recommend you first get familiar with links, joints, collisions and visuals in Gazebo. This tutorial should give you a good idea.

After you've understood those concepts, let's go through an example of creating separate links for each node on a COLLADA mesh.

Let's take the zephyr_delta_wing model as an example.

  1. Open the collada file and look for <node> elements (they should be inside <visual_scene>. This is what they look like for the Zephyr wing:

    <node name="EnvironmentAmbientLight">
      (...)
    </node>
    <node id="node-Wing_Bone" name="Wing_Bone">
      (...)
      <node id="node-Wing" name="Wing">
        (...)
      </node>
      <node id="node-Flap_Left_Bone" name="Flap_Left_Bone">
        (...)
        <node id="node-Flap_Left" name="Flap_Left">
          (...)
        </node>
      </node>
      <node id="node-Flap_Right_Bone" name="Flap_Right_Bone">
        (...)
        <node id="node-Flap_Right" name="Flap_Right">
        </node>
      </node>
      <node id="node-Prop_Bone" name="Prop_Bone">
        (...)
        <node id="node-Prop" name="Propeller">
          (...)
        </node>
      </node>
    </node>
    
  2. On our SDF file, where we reference the COLLADA file, if we don't choose a submesh, all the nodes will be used together. But if we want only one node, we can refer to its name. For example, for the propeller link we have the following:

    <link name="propeller">
      (...)
      <visual name="visual">
        (...)
        <geometry>
          <mesh>
            <uri>model://zephyr_delta_wing/meshes/wing.dae</uri>
            <submesh>
              <name>Propeller</name>
              <center>true</center>
            </submesh>
          </mesh>
        </geometry>
      </visual>
    </link>
    
  3. Note how each link of that model has a different submesh and how they can be moved independently in simulation:

image description

A Collada or STL file by itself won't give you UPDATE: I just realized this question is about the model editor, while this other question is about Gazebo links, you must put each "node" of your mesh into a separate <link> in your model's SDF description.general.

I recommend you first get familiar with links, joints, collisions and visuals in Gazebo. ThisThe short answer regarding the model editor is that is currently doesn't support submeshes. Please ticket an issue here tutorial should give you a good idea.asking for the feature.

After you've understood those concepts, let's go through an example of creating separate links for each node on a COLLADA mesh.

Let's take the zephyr_delta_wing model as an example.

  1. Open the collada file and look for <node> elements (they should be inside <visual_scene>. This is what they look like for the Zephyr wing:

    <node name="EnvironmentAmbientLight">
      (...)
    </node>
    <node id="node-Wing_Bone" name="Wing_Bone">
      (...)
      <node id="node-Wing" name="Wing">
        (...)
      </node>
      <node id="node-Flap_Left_Bone" name="Flap_Left_Bone">
        (...)
        <node id="node-Flap_Left" name="Flap_Left">
          (...)
        </node>
      </node>
      <node id="node-Flap_Right_Bone" name="Flap_Right_Bone">
        (...)
        <node id="node-Flap_Right" name="Flap_Right">
        </node>
      </node>
      <node id="node-Prop_Bone" name="Prop_Bone">
        (...)
        <node id="node-Prop" name="Propeller">
          (...)
        </node>
      </node>
    </node>
    
  2. On our SDF file, where we reference the COLLADA file, if we don't choose a submesh, all the nodes will be used together. But if we want only one node, we can refer to its name. For example, for the propeller link we have the following:

    <link name="propeller">
      (...)
      <visual name="visual">
        (...)
        <geometry>
          <mesh>
            <uri>model://zephyr_delta_wing/meshes/wing.dae</uri>
            <submesh>
              <name>Propeller</name>
              <center>true</center>
            </submesh>
          </mesh>
        </geometry>
      </visual>
    </link>
    
  3. Note how each link of that model has a different submesh and how they can be moved independently in simulation:

image description