Importing cad model in gazebo
Hi ,
I want to import cad models in gazebo3 to create the environment. Can anyone suggest how can I do that? Is there any tutorial related to this?I want to import cad model stored as .stl format developed in solidworks tool into gazebo 2.2 version. I used blender to convert it into .dae file. when I import it into gazebo it automatically starts moving without applying any forces or velocity and starts falling down . Then I convert it first to .obj file and then .dae but then also it behaves the same. Can anyone suggest what is wrong? here I am attaching my .dae file . I saved it as .sdf because it wasn't accepting the .dae format while attaching. The attached file is .obj to .dae converted file. Thanks! objTO dae.sdf
Here is the sdf for above mesh.
<sdf version="1.4">
<model name="robot">
<link name="link1">
<inertial>
<mass>10000.0</mass>
<inertia>
<ixx>140</ixx>
<ixy>0.0</ixy>
<iyy>550</iyy>
<ixz>0.0</ixz>
<iyz>0.0</iyz>
<izz>550</izz>
</inertia>
</inertial>
<visual name="visual">
<!-- rotate mesh to get to X-forward -->
<pose>0 0 0 0 0 -1.570796</pose>
<geometry>
<mesh>
<scale>20 20 20</scale>
<uri>model://robot/meshes/untitled3.dae</uri>
</mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<mesh>
<scale>100 100 100</scale>
<uri>model://robot/meshes/untitled3.dae</uri>
</mesh>
</geometry>
</collision>
</link>
</model>
</sdf>
I was able to load your model. Note that the collisions are positioned and scaled differently from the visuals. At first it was falling through like yours, but then I exported the model path and it now collides with the ground. (cd <models directory="">; export GAZEBO\_MODEL\_PATH=\`pwd\`:GAZEBO\_MODEL\_PATH)
Yes, the issue was because of different scaling factor of collisions and visuals.. Thanks a lot!