Tutorials/1.3/beginner/mesh import

This tutorial describes how to import 3D meshes into Gazebo.
 * 1) Tutorial: Importing Meshes#


 * 1) Prepare the Mesh

Gazebo uses a right-hand coordinate system where +Z is up (vertical), +X is forward (into the screen), and +Y is to the left.


 * Reduce Complexity**

Many meshes can be overly complex. A mesh with many thousands of triangles should be reduced or split into separate meshes for efficiency. Look at the documentation of your 3D mesh editor for information about reducing triangle count or splitting up a mesh.


 * Center the mesh**

The first step is to center the mesh at (0,0,0) and orient the front (which can be subjective) along the x-axis.


 * Scale the mesh**

Gazebo uses the metric system. Many meshes (especially those from 3D warehouse), use English units. Use your favorite 3D editor to scale the mesh to a metric size.


 * 1) Export the Mesh ###

Once the mesh has been properly prepared, export it as a Collada file. This format will contain all the 3D information and the materials.


 * 1) Test the Mesh ###

The easiest way to test a mesh is to create a simple world file that loads the mesh. Replace `my_mesh.dae` with the actual filename of the mesh.

  model://ground_plane model://sun  0 0 0 1.57 0 0      true file://my_mesh.dae

Then just launch Gazebo

gazebo my_mesh.world


 * 1) Test Mesh ###

You can use these duck.dae and duck.pngmesh files. Put them together in the model directory, or in the same directory as the world file.