How to create a model population in Gazebo Garden [closed]
Run Environment
- Ubuntu 20.04.5 LTS
- Gazebo Garden, Binary Install
- OGRE
Run code
<?xml version="1.0" ?>
<!-- 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>
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?
Asked by tanguy on 2023-06-18 17:44:33 UTC
Answers
If anyone stumbles on this in the future and is interested, I got great answers to this question in this thread : https://community.gazebosim.org/t/creating-a-model-population-in-gazebo-garden/2060/3
Asked by tanguy on 2023-06-23 03:35:53 UTC
Comments