Gazebo | Ignition | Community
Ask Your Question

Importing cad model in gazebo

asked 2014-12-23 23:31:18 -0500

anonymous gravatar image

updated 2015-04-29 20:39:27 -0500

chapulina gravatar image

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">












      <visual name="visual">

        <!-- rotate mesh to get to X-forward -->

        <pose>0 0 0 0 0 -1.570796</pose>



        <scale>20 20 20</scale>





      <collision name="collision">



            <scale>100 100 100</scale>







edit retag flag offensive close merge delete


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)

chapulina gravatar imagechapulina ( 2015-04-28 12:52:20 -0500 )edit

Yes, the issue was because of different scaling factor of collisions and visuals.. Thanks a lot!

anonymous gravatar imageanonymous ( 2015-04-29 00:54:50 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-12-26 07:46:41 -0500

chapulina gravatar image

Here's a tutorial on how to import 3D meshes into Gazebo.

edit flag offensive delete link more

answered 2014-12-25 23:30:21 -0500

Zheng yo chen gravatar image

I usually use blender to convert .stl or .ply to .dae which can be read in sdf file

download link

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-12-23 23:31:18 -0500

Seen: 20,220 times

Last updated: Apr 29 '15