# Is a gazebo world unmodifiable after you hit save?

I created a world in gazebo with 2 levels and realized that I wouldn't see my robot moving in it. So I tried to delete the 2nd level but couldn't find a means to do so. Is the GUI not capable of doing this? Do I have to go through the thousand-line sdf file to remove the level?

## 1 Answer

You can call gazebo passing the world file as argument, modify it and use File -> Save As... overwriting the original file.

But a more robust approach is bypassing the GUI editor entirely and creating world and model files directly in your text editor of choice.

The reason GUI editing features don't seem very robust is probably because advanced users seldom use them: instead we use e.g. xacro to enable the creation of part libraries that can be reused in much more flexible ways than any GUI would ever allow.

• You would still need to run the GUI though to see that the addition of a new xacro file placed your model at the right position, right? – heretoinfinity Apr 25 '20 at 13:06
• Yes, that's right. However it's easy to create a script to run xacro followed by spawn_model to re-instantiate a model as you're working on it. Then all you need to do is to remove the current instance from the simulation and run the script to check the effects of changes in the model files. – xperroni Apr 25 '20 at 13:47
• I am not aware of that. ARe you referring to something similar under the Spawn Model section of gazebosim.org/tutorials/?tut=ros_comm? – heretoinfinity Apr 25 '20 at 13:55
• Yes, that's a start. Also see this reference on using roslaunch. – xperroni Apr 25 '20 at 14:25
• The tutorial I have been using didn't get to ros yet at this point but that shouldn't matter in the grand scheme of things. – heretoinfinity Apr 25 '20 at 14:26