Robotics StackExchange | Archived questions

.sdf and .world file (correct usage)

Hi,

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 (http://gazebosim.org/tutorials/?tut=import_mesh) and some use an .sdf file (http://gazebosim.org/tutorials?tut=build_world&cat=build_world) 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.

Thanks!

Asked by shoemakerlevy9 on 2017-01-19 16:17:45 UTC

Comments

Answers

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.

Asked by hugomatic on 2017-01-19 18:43:54 UTC

Comments

The problem is that in your tutorials you are saving a world as sdf which makes it super confusing: http://gazebosim.org/tutorials?tut=build_world

Asked by Cuauhtemoc on 2019-07-30 12:44:53 UTC