load multi object from world file

asked 2013-11-21 03:25:10 -0600

Vahid gravatar image

Hi Dear All,

I changed one of the world file to put some cubes in world but it doesn't work, when i run this world just one cube comes to world,

<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <!-- A global light source -->
    <include>
      <uri>model://sun</uri>
    </include>
    <!-- A ground plane -->
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <!-- First Cube -->
    <include>
      <uri>model://cube_small</uri>
      <pose>-3 -3 0 0.0 0.0 0.0</pose>
    </include>
<!-- Second Cube -->
    <include>
      <uri>model://cube_small</uri>
      <pose>3 3 0 0.0 0.0 0.0</pose>
    </include>
  </world>
</sdf>

any one knows what is problem?

edit retag flag offensive close merge delete

Comments

does it give you any error? what is the terminal output when you load the world? and which Gazebo version are you using? Since in older versions you couldn't load multiple models with the same name.

AndreiHaidu gravatar imageAndreiHaidu ( 2013-11-21 03:45:46 -0600 )edit

Thank you for answering, no there is not any errors, also terminal output is like as usual, my gazebo version is 1.9.1.

Vahid gravatar imageVahid ( 2013-11-21 04:27:15 -0600 )edit

Yes, you are right the problem just was with the name, now my problem is solved.

Vahid gravatar imageVahid ( 2013-11-21 13:35:39 -0600 )edit