ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Gazebo world file from a collada file [closed]

asked 2011-08-14 20:47:12 -0500

ChickenSoup gravatar image

updated 2016-05-17 02:46:42 -0500

Dear ROS users,

I created a collada file of a terrain using Blender and now I want it to be included in a Gazebo .world file. How is this done?

Thanks in advance

CS

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Martin Günther
close date 2016-05-17 03:25:42.161771

1 Answer

Sort by » oldest newest most voted
3

answered 2011-08-15 00:56:41 -0500

AHornung gravatar image

Have a look at the files world/wg_collada.world and launch/wg_collada_world.launch in the gazebo_worlds package. They load a map from a collada file.

The code in question is:

<model:physical name="willow_map">
   <xyz>-33.0 -15.0 0</xyz>
   <rpy>0 0 0</rpy>
   <static>true</static>
   <body:trimesh name="willow_map_body">
     <geom:trimesh name="willow_map_geom">
       <scale>0.02 0.02 0.02</scale>
       <mesh>willowgarage.dae</mesh>
       <visual>
         <scale>0.02 0.02 0.02</scale>
         <mesh>willowgarage.dae</mesh>
       </visual>
     </geom:trimesh>
   </body:trimesh>
  </model:physical>
edit flag offensive delete link more

Comments

Thank you for your answer. I already looked at it but I do not know why my terrain model is not loaded. Is there any special way of creating the collada file ?(for e.g. to check some kind of options when I export) One more thing. Do we have to copy the .dae file into gazebo share folder? Can't we just have it on a user specified location? Thank you in advance.
ChickenSoup gravatar image ChickenSoup  ( 2011-08-15 15:09:28 -0500 )edit
1
Actually, in Gazebo there is a terrain builder utility called gzbuilder. But it seems like it does not exist in ROS Gazebo. That is why I went for collada files. If anyone can shed light on how to build a simple terrain, it would be really appreciated. Thanks
ChickenSoup gravatar image ChickenSoup  ( 2011-08-15 17:58:08 -0500 )edit
gzbuilder has not been kept up-to-date. How big is your terrain file (faces/vertices)? Make sure the scale is correct (default view suitable for meters). Take a look at http://www.ros.org/wiki/simulator_gazebo/GazeboConfiguration for where to put the meshes.
hsu gravatar image hsu  ( 2011-09-02 12:20:37 -0500 )edit
Thanks for your answer hsu.
ChickenSoup gravatar image ChickenSoup  ( 2011-09-11 20:22:40 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2011-08-14 20:47:12 -0500

Seen: 1,520 times

Last updated: May 17 '16