How does the population element work in SDFormat?

asked 2021-08-09 14:31:36 -0500

FirefoxMetzger gravatar image

updated 2021-08-09 14:49:19 -0500

Looking at the SDFormat spec for v1.8, there is the /world/population element. I'm trying to figure out how this is supposed to work, but I can't seem to find more detailed docs or a usage example. If somebody can clear up my confusion a bit this would be greatly appreciated. What confuses me in particular:

  1. If /world/population/distribution/type is set to "random" (a) which distribution is used? and (b) is there a clipping range?
  2. The element allows multiple models to be defined. If I specify multiple, how are they used? round-robin? random? only the first?
  3. What do the Box and Cylinder elements do? Are they objects that can be spawned as well, or do they constrain the distribution used if type is "random"?

Spec Link: http://sdformat.org/spec?ver=1.8&elem...

I also just found this tutorial on gazebosim: http://www.gazebosim.org/tutorials?tu...

It would answer question 3, in that the box and the cylinder are used for mode "random" to clip the distribution. Which opens up a new question:

  1. Both objects have default values. Which one will be used to spawn models inside?
edit retag flag offensive close merge delete

Comments

1

Number 2: This is in fact a bug in the current spec. The source code specifies that only a single model is permitted. See this related comment in an issue on GitHub (and the previous one): https://github.com/ignitionrobotics/s...

FirefoxMetzger gravatar imageFirefoxMetzger ( 2021-08-10 05:24:53 -0500 )edit