Robotics StackExchange | Archived questions

Problem with model duplication in a gazebo world

In our gazebo world, we are trying to duplicate an instance of a model, in this case a simple cylinder. See the simple example below, where we are calling three items: two times the cylinder and one other item. In our world file are two models, one is duplicated. In the gazebo simulation there are only two items to be seen, the cylinder and the other item. The duplication of the cylinder does not work. Amazingly | Surprisingly, the same .world file with identical model .sdf and .config files works fine on another computer with an identical 16.04/kinetic (gazebo 7.0.0) in this installation. We reinstalled gazebo (gazebo 7.16.0), however, the problem persists. Is this a known problem?

   <sdf version='1.6'>
      <world name='default'>
        <physics type="ode">
         <max_step_size>0.005</max_step_size>
        </physics>
        <include>
          <uri>model://ground_plane</uri>
        </include>
        <include>
          <uri>model://sun</uri>
        </include>
        <include>
            <pose>-1 -.35 0 0 0 0</pose>
            <uri>model://turtlebot3_autorace/pumpkin</uri>
        </include>
        <include>
            <pose>0 0 0 0 0 0</pose>
            <uri>model://turtlebot3_autorace/pumpkin</uri>
        </include>
        <include>
            <pose>1 0 0 0 0 0</pose>
            <uri>model://turtlebot3_autorace/border_cylinder</uri>
        </include>
      </world>
    </sdf>

Asked by microo on 2020-02-03 05:55:23 UTC

Comments

Answers

Most probably, it's about the names. You need to give individual names to the included models:

<include>
    <name>pumpkin1</name>
    <pose>-1 -.35 0 0 0 0</pose>
    <uri>model://turtlebot3_autorace/pumpkin</uri>
</include>
<include>
    <name>pumpkin2</name>
    <pose>0 0 0 0 0 0</pose>
    <uri>model://turtlebot3_autorace/pumpkin</uri>
</include>

Asked by nlamprian on 2020-02-03 12:32:51 UTC

Comments

Furthermore, these names should not collide also with world names (and I guess with any names at all). I ran to similar problem and it was a bit more hidden, since the model was spawned, but its pose couldn't be changed, until name different from world was set - this might be actually your case also, cylinders were duplicated, but not moved. Gazebo 11

Asked by m.bahno on 2021-01-05 15:12:33 UTC

Thank you very much. It seems as if there is a subtle difference in this respect between 7.0.0 and 7.16.0

Asked by microo on 2020-02-04 02:57:05 UTC

Comments