0
$\begingroup$

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.

$\endgroup$

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
2
  • $\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$
    – xperroni
    Apr 25, 2020 at 14:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.