Gazebo | Ignition | Community
Ask Your Question

.sdf and .world file (correct usage)

asked 2017-01-19 15:17:45 -0500

shoemakerlevy9 gravatar image


I have been using Gazebo for about a year now and I am still very confused about .sdf and .world files. Are they the same thing? Some of the tutorials use .world file to make a world ( and some use an .sdf file ( and its even called my_world.sdf, very confusing.

Am I correct in saying that the old deprecated usage would we to use a .urdf to model a robot and a .world file to model the word. And now we should just be able to use a single .sdf file?

Either way it would be nice if the tutorials were consistent with the usage of these file formats, or at least explained the proper usage.


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-01-19 17:43:54 -0500

hugomatic gravatar image

Both world and sdf files share the same SDF format. The world file describes a scene that contains objects and models (robots are models). You can define models directly in a world file, and you see this often in our tutorials.

But when models are in their own .sdf files, they can be reused and featured in multiple worlds. Our model database, for example, contains many model .sdf files.

Finally, when Gazebo starts, it expects a world file, not a single model.

edit flag offensive delete link more


The problem is that in your tutorials you are saving a world as sdf which makes it super confusing:

Cuauhtemoc gravatar imageCuauhtemoc ( 2019-07-30 12:44:53 -0500 )edit

Question Tools

1 follower


Asked: 2017-01-19 15:17:45 -0500

Seen: 9,883 times

Last updated: Jan 19 '17