Gazebo | Ignition | Community
Ask Your Question
0

Problem with model duplication in a gazebo world

asked 2020-02-03 04:55:23 -0600

microo gravatar image

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>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-02-03 11:32:51 -0600

nlamprian gravatar image

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>
edit flag offensive delete link more

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

m.bahno gravatar imagem.bahno ( 2021-01-05 14:12:33 -0600 )edit
0

answered 2020-02-04 01:57:05 -0600

microo gravatar image

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

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-02-03 04:55:23 -0600

Seen: 68 times

Last updated: Feb 04 '20