Gazebo | Ignition | Community
Ask Your Question

Importing models on gazebo

asked 2017-12-05 14:34:39 -0600

bxl gravatar image

I have a model that I consists of a shelf and some boxes in it. image description

I made this model on other programs like blender or google sketchup and imported on gazebo as Collada file.

I'm facing two issue on the gazebo model:

  1. On importing the collada file from any other software no texture is applied.

  2. The figure shows the collision of my model. That is correct. However, when my robot bump against one of the box it does not move. My model is set static.

This is my sdf file:

   <?xml version='1.0'?>
   <sdf version='1.6'>
   <model name='blender_shelf'>
     <link name='link_0'>
     <pose frame=''>0 0 0 0 -0 0</pose>
   <visual name='visual'>
    <pose frame=''>0 0 0 0 -0 0</pose>
        <scale>1 1 1</scale>
      <ambient>0.3 0.3 0.3 1</ambient>
      <diffuse>0.7 0.7 0.7 1</diffuse>
      <specular>0.01 0.01 0.01 1</specular>
      <emissive>0 0 0 1</emissive>
  <collision name='collision'>
    <pose frame=''>0 0 0 0 -0 0</pose>
          <fdir1>0 0 0</fdir1>

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-12-05 14:44:17 -0600

chapulina gravatar image

updated 2017-12-05 16:13:17 -0600

  1. Inside populated-_shelf.dae, make sure the texture URI (a png file perhaps?) is correct, it's a good idea if it starts with model:// or file://
  2. You said your model is set static, but the code says it isn't: <static>0</static>. This means the shelf should move. Maybe you're not bumping strong enough? Try pushing it with the Force / Torque tool. Note that the shelf and the boxes are being treated as a single solid mass, you'll need to tweak some things if you want the boxes to move independently.


For the boxes to move independently, they must consist of separate links on SDF, each with its own mass, visual and collision.

I recommend you look at an example, such as Polaris Ranger EV or Zephyr Delta Wing. Look for the submesh tags and see how they correspond to geometries / nodes on the COLLADA file.

edit flag offensive delete link more


1. I checked out the model path and it is right. I even tried the full path. 2. @chapulina I do want each box and the shelf to behavior independently one from the other. What you mean "by tweak some things"

bxl gravatar imagebxl ( 2017-12-05 16:04:57 -0600 )edit

I updated the question regarding the independent boxes. For the texture, have you tried running Gazebo on verbose mode? It usually prints a message when it can't find textures.

chapulina gravatar imagechapulina ( 2017-12-05 16:15:00 -0600 )edit

I've performed some tests on the `init_from` tag and when i used models`s full path gazebo raised `texture error`. However, for the path I'm using it does not shows any error and does not load the texture.

bxl gravatar imagebxl ( 2017-12-06 14:38:26 -0600 )edit

I just noticed you're setting the material to Gazebo/Grey, that's probably overriding the texture on the collada file.

chapulina gravatar imagechapulina ( 2017-12-07 12:26:50 -0600 )edit

Regarding the texture, the gazebo material was overridden the texture on collada file.

bxl gravatar imagebxl ( 2017-12-08 11:37:52 -0600 )edit

Question Tools

1 follower


Asked: 2017-12-05 14:34:39 -0600

Seen: 2,191 times

Last updated: Dec 05 '17