<?xml version="1.0" ?>
<sdf version="1.7">
<world name="default">
<!-- A global light source -->
<include>
<uri>model://sun</uri>
</include>
<!-- A ground plane -->
<include>
<uri>model://ground_plane</uri>
</include>
<!-- Testing the automatic population of objects -->
<population name="rock_population1">
<model name="rock1">
<include>
<static>true</static>
<uri>model://rock</uri>
</include>
</model>
<pose>0 0 0 0 0 0</pose>
<box>
<size>2 2 0.01</size>
</box>
<model_count>10</model_count>
<distribution>
<type>random</type>
</distribution>
</population>
</world>
</sdf>
gz sim world.sdf
Issue
Hi! I’d like to spawn multiple entities of a model in my world using the SDF world/population element following this tutorial and although the SDF element is recognized (I get an error if I dont define the population name) and I dont get any errors, nothing appears in my world nor in the entity tree. The “rock” model loads perfectly fine when I have it there on it’s own.
I’m importing <plugin filename="gz-sim-physics-system" name="gz::sim::systems::Physics"> </plugin> but I don’t see any Population.hh or PopulationParams.hh in my /usr/include/gz/physics6.
TLDR; How can I use the SDF population element in Gazebo Garden?
Hi! I’d like to spawn multiple entities of a model in my world using the SDF world/population element following this tutorial and although the SDF element is recognized (I get an error if I dont define the population name) and I dont get any errors, nothing appears in my world nor in the entity tree.
Load above sdf with gz sim world.sdf and then in another terminal call the create service (or call it from a script, varying the <pose>, if you want to spawn many):