Is it possible to start with a with an empty world, empty.world
and then import walls (other worlds into it)? I can't seem to find an import option in the gazebo menu.
1 Answer
If you mean merging other world's contents into an open world file in the Gazebo GUI, no, there is no way to do that.
You can however open the world files in a text editor and just copy contents over. Most worlds are structured as a sequence of <include>
tags pointing to external models, so this would be quite easy to do. Notice you can add a <pose>
tag inside <include>
to shift models around if you need.
-
$\begingroup$ Would a world thus be included as a model with
<include> <uri>model://world_file_name</uri> </include>
? $\endgroup$ Apr 25, 2020 at 13:36 -
1$\begingroup$ Unfortunately no, in this case the target of the
<include>
tag must be a model. What you can do is import one or more models inside another: this allows you to create complex models by combining simpler ones. You could set it up so that everything in your simulation is defined as models and then world files just have one<include>
tag, but the fact remains that world files themselves cannot be<include>
d. $\endgroup$– xperroniApr 25, 2020 at 14:11