[ros-users] How to generate a world with 30 objects on a table?

John Hsu johnhsu at willowgarage.com
Fri Oct 15 17:20:36 UTC 2010


Hi Patrick,

I get around this by starting the world paused with -u flag (see this launch
script for example<https://code.ros.org/svn/wg-ros-pkg/stacks/pr2_simulator/trunk/pr2_gazebo/empty_world_paused.launch>),
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<https://code.ros.org/svn/wg-ros-pkg/branches/trunk_cturtle/stacks/wg_robots_gazebo/pr2_plugs_gazebo_demo/scripts/wait_spawn.py>,
which waits on a ros topic, but you could very well call the
gazebo/get_world_properties
service offered by gazebo <http://www.ros.org/wiki/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 <wpdster at gmail.com> 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 at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101015/75a1ea53/attachment-0003.html>


More information about the ros-users mailing list