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

Patrick Doyle wpdster at gmail.com
Fri Oct 15 01:31:22 UTC 2010

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

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

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?



More information about the ros-users mailing list