Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

Hi,

Here is a tutorial how to import a mesh in gazebo. You could also create an sdf model and import it in the .world file.

<include>
  <uri>model://mesh_model</uri>
  <pose>0 0 1 0 0 0</pose>
</include>

In order to load it save the mesh_model in ~/.gazebo/models folder.

Cheers, Andrei

Hi,

Here is a tutorial how to import a mesh in gazebo. You could also create an sdf model and import it in the .world file.

<include>
  <uri>model://mesh_model</uri>
  <pose>0 0 1 0 0 0</pose>
</include>

In order to load it save the mesh_model in ~/.gazebo/models folder.

UPDATE

One link with many mesh collisions visuals:

    <model name="my_mesh_one_link">
      <link name="mesh_link">

        <visual name="visual1">
          <geometry>
            <mesh><uri>file://my_mesh1.dae</uri></mesh>
          </geometry>
        </visual>
        <collision name="collision1">
          <geometry>
            <mesh><uri>file://my_mesh1.dae</uri></mesh>
          </geometry>
        </collision>

        <visual name="visual2">
          <geometry>
            <mesh><uri>file://my_mesh2.dae</uri></mesh>
          </geometry>
        </visual>
        <collision name="collision2">
          <geometry>
            <mesh><uri>file://my_mesh2.dae</uri></mesh>
          </geometry>
        </collision>

      </link>
    </model>

For every mesh a different link:

    <model name="my_mesh_many_links">

      <link name="mesh_link1">
        <visual name="visual1">
          <geometry>
            <mesh><uri>file://my_mesh1.dae</uri></mesh>
          </geometry>
        </visual>
        <collision name="collision1">
          <geometry>
            <mesh><uri>file://my_mesh1.dae</uri></mesh>
          </geometry>
        </collision>
      </link>

      <link name="mesh_link2">
        <visual name="visual2">
          <geometry>
            <mesh><uri>file://my_mesh2.dae</uri></mesh>
          </geometry>
        </visual>
        <collision name="collision2">
          <geometry>
            <mesh><uri>file://my_mesh2.dae</uri></mesh>
          </geometry>
        </collision>
      </link>

    </model>

With the later model you can add joints between the links. If you want them to behave statically between them use only one link.

Cheers, Andrei