Gazebo | Ignition | Community
Ask Your Question
0

How to create a model population in Gazebo Garden [closed]

asked 2023-06-18 17:44:33 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Run Environment

  • Ubuntu 20.04.5 LTS
  • Gazebo Garden, Binary Install
  • OGRE

Run code

<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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-23 03:35:53 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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/cre...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-06-18 17:44:33 -0500

Seen: 100 times

Last updated: Jul 07 '23