Hi Patrick, I get around this by starting the world paused with -u flag (see this launch script for example), and spawning everything when simulation is paused, then unpausing after everything is in place. Another strategy is to write a script that waits for certain conditions to be satisfied before spawning. One example is here, which waits on a ros topic, but you could very well call the gazebo/get_world_properties service offered by gazebo and enforce some kind of spawning dependencies. If you have any suggestions, please feel free to file feature request tickets. Thanks, John On Thu, Oct 14, 2010 at 6:31 PM, Patrick Doyle wrote: > What is the best way to create a world with a table and 30 objects on > it? Currently, I am spawning all of them as URDFs from a launch file > using 31 "spawn_model" nodes. But that has some problems -- there is > a race condition between when the table gets created and when the > objects get created, such that some of the objects get created before > the table does and fall to the floor (or get embedded in the table). > To work around this, I spawn the objects above the table and let them > drop onto it. But this is inelegant at best, and error prone at worse > -- as I add more items to my launch file, the timing could change once > again. > > I could create a Gazebo world file, but the world file syntax is > dramatically different than the URDF syntax and doesn't seem to > support collisions or cylindrical and spherical shapes in the same way > that URDF files do. At least I don't those listed at > > http://playerstage.sourceforge.net/doc/Gazebo-manual-0.8.0-pre1-html/config_syntax.html > . > > I could create a single URDF file with the table and all 30 objects as > separate independent lnks. They would all be grouped together as a > single Gazebo object with a single name. Is that going to be a > problem? Will I be able to have my robot pick up and move the links > independently of each other? Or do I need to specify "floating" > joints between the table and the objects on the table? > > Are there any examples of this sort in the source tree, or any tips > folks could share with me? > > Thanks. > > --wpd > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users >