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
Originally posted by AndreiHaidu with karma: 2108 on 2013-03-15
This answer was ACCEPTED on the original site
Post score: 1
Original comments
Comment by skhan on 2013-03-15:
@AndreiHaidu
Thanks, I am aware of it that how I import it but for simulation I have to import part by part or whole design?
Comment by AndreiHaidu on 2013-03-15:
Well, you can either create for every mesh file a link, and then add joints between the links. Or if you want all the pieces in a single link, then you just add more collisions and visuals. I updated the answer with an example. Hope it helps :)
Comment by skhan on 2013-03-20:
Thanks I try this approach
Comment by IsaacS on 2014-11-15:
Tutorial URL moved to http://gazebosim.org/tutorials?tut=import_mesh&cat=build_robot