Import .dae Gazebo-1.0.0-RC2 [closed]

asked 2012-03-13 01:38:51 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello, I know there are more threads like here: http://answers.ros.org/question/11013/importing-collada-meshes-into-a-gazebo-world or http://answers.ros.org/question/1862/gazebo-world-file-from-a-collada-file or http://answers.ros.org/question/2914/create-rough-terrain-for-used-in-gazebo

but my problem is the next:

I have a few models in collada with their images in the follow distribution (for example):

chair3
-images
-----DSCI0887noCulling.jpg
-----Wood_Bamboo_LightnoCulling.jpg
-----Wood_CherrynoCulling
-model
-----chair.dae
-----chair.stl
-doc.kml
-textures.txt

ok inside model/chair.dae I have:

.
.
.
.
<library_images>
          <image id="Wood_CherrynoCulling-image" name="Wood_CherrynoCulling-image">
             <init_from>../images/Wood_CherrynoCulling.jpg</init_from>
          </image>
          <image id="Wood_Bamboo_LightnoCulling-image" name="Wood_Bamboo_LightnoCulling-image">
             <init_from>../images/Wood_Bamboo_LightnoCulling.jpg</init_from>
          </image>
          <image id="DSCI0887noCulling-image" name="DSCI0887noCulling-image">
             <init_from>../images/DSCI0887noCulling.JPG</init_from>
          </image>
       </library_images>
.
.
.
.

but my problem is: How I imoport to gazebo ChairColladaWorld.world the chair.dae?

I try with:

  <model:physical name="chair">
   <xyz>5.0 -5.0 0.1</xyz>
   <rpy>0 0 0</rpy>
   <static>true</static>
   <body:trimesh name="chair">
      <geom:trimesh name="chair">
        <scale>1.0 1.0 1.0</scale>
        <mesh>chair.dae</mesh>
        <visual>
           <scale>1.0 1.0 1.0</scale>
           <mesh>chair.dae</mesh>
        </visual>
      </geom:trimesh>
  </body:trimesh>
 </model:physical>

But it seems like the sytaxis is old, I can't find more examples and I need a little help here.

I try with:

  <model name="chair" static="true">
   <origin pose="0 0 0 0 0 0"/>
   <body:trimesh name="chair">
      <geom:trimesh name="chair">
        <scale>1.0 1.0 1.0</scale>
        <mesh>chair.dae</mesh>
        <visual>
           <scale>1.0 1.0 1.0</scale>
           <mesh>chair.dae</mesh>
        </visual>
      </geom:trimesh>
  </body:trimesh>
 </model:physical>

But I think I am doing something wrong.

Of course, I try with:

export GAZEBO_RESOURCE_PATH=~/models/chair3/model

With that export, I think is enough to Gazebo to find the path to the model .dae and their images.

errors lunching:

$ gzserver ChairColladaWorld.world
Gazebo multi-robot simulator, version 1.0.0-RC2
Copyright (C) 2011 Nate Koenig, John Hsu, Andrew Howard, and contributors.
Released under the Apache 2 License.
http://gazebosim.org

Error [parser.cc:520] XML Element[model:physical], child of element[world] not defined in SDF. Ignoring.[world]
Error [parser.cc:511] Error reading element
Error [parser.cc:313] Unable to parse sdf element[gazebo]
Warning [parser.cc:235] parser for sdf version 1.0 failed, trying to parse as old deprecated format
namespace error : Namespace prefix model on physical is not defined
<model:physical name="chair">
                            ^
namespace error : Namespace prefix body on trimesh is not defined
<body:trimesh name="chair">
                          ^
namespace error : Namespace prefix geom on trimesh is not defined
<geom:trimesh name="chair">
                          ^
Entity: line 63: parser error : Opening and ending tag mismatch: world line 3 and gazebo
</gazebo>
         ^
Entity: line 65: parser error : Premature end of data in tag gazebo line 2

^
Error [parser_deprecated.cc:1210] Could not parse the xml
Warning [parser.cc:241] parsing using deprecated world file failed trying old model format.
namespace error : Namespace prefix model on physical is not defined
<model:physical name="chair">
                            ^
namespace error ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2014-12-07 00:53:06.909020