Hi Patrick,<br><br>I get around this by starting the world paused with -u flag (<a href="https://code.ros.org/svn/wg-ros-pkg/stacks/pr2_simulator/trunk/pr2_gazebo/empty_world_paused.launch">see this launch script for example</a>), 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 <a href="https://code.ros.org/svn/wg-ros-pkg/branches/trunk_cturtle/stacks/wg_robots_gazebo/pr2_plugs_gazebo_demo/scripts/wait_spawn.py">here</a>, which waits on a ros topic, but you could very well call the <a href="http://www.ros.org/wiki/gazebo">gazebo/get_world_properties service offered by gazebo</a> and enforce some kind of spawning dependencies.<br>

<br>If you have any suggestions, please feel free to file feature request tickets.<br><br>Thanks,<br>John<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 6:31 PM, Patrick Doyle <span dir="ltr"><<a href="mailto:wpdster@gmail.com">wpdster@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">What is the best way to create a world with a table and 30 objects on<br>
it?  Currently, I am spawning all of them as URDFs from a launch file<br>
using 31 "spawn_model" nodes.  But that has some problems -- there is<br>
a race condition between when the table gets created and when the<br>
objects get created, such that some of the objects get created before<br>
the table does and fall to the floor (or get embedded in the table).<br>
To work around this, I spawn the objects above the table and let them<br>
drop onto it.  But this is inelegant at best, and error prone at worse<br>
-- as I add more items to my launch file, the timing could change once<br>
again.<br>
<br>
I could create a Gazebo world file, but the world file syntax is<br>
dramatically different than the URDF syntax and doesn't seem to<br>
support collisions or cylindrical and spherical shapes in the same way<br>
that URDF files do.  At least I don't those listed at<br>
<a href="http://playerstage.sourceforge.net/doc/Gazebo-manual-0.8.0-pre1-html/config_syntax.html" target="_blank">http://playerstage.sourceforge.net/doc/Gazebo-manual-0.8.0-pre1-html/config_syntax.html</a>.<br>
<br>
I could create a single URDF file with the table and all 30 objects as<br>
separate independent lnks.  They would all be grouped together as a<br>
single Gazebo object with a single name.  Is that going to be a<br>
problem?  Will I be able to have my robot pick up and move the links<br>
independently of each other?  Or do I need to specify "floating"<br>
joints between the table and the objects on the table?<br>
<br>
Are there any examples of this sort in the source tree, or any tips<br>
folks could share with me?<br>
<br>
Thanks.<br>
<br>
--wpd<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br>