Robotics StackExchange | Archived questions

Creating .world file. World did not load with custom world name

I am trying to create a world using the sdf format.

In the tutorials, the world tag has a name attribute for the unique world name.

The example says to name the world as

<world name='default'>

However, I want the name for my world to be different from 'default'. So I did this:

<world name='my_world'>

I realized that the world did not load with my custom world name.

It only runs when the name attribute is 'default'.

Is this the expected behaviour?

Many thanks

Asked by elcymon on 2017-12-13 07:48:57 UTC

Comments

Could you provide a minimal example that reproduces your issue? Custom names work fine for me.

Asked by chapulina on 2017-12-13 11:03:13 UTC

Also, what Gazebo version are you using?

Asked by chapulina on 2017-12-13 11:03:58 UTC

I am using Gazebo 7.4

I tried a simple world example and it works with custom world name.

The problem seems to come when the number of models in the world are large.

I populate my world with about 200 red boxes. The world didn't load when I used custom world name after waiting for minutes. However, it loaded within seconds when I used "default".

upon reducing the number of red boxes model to about 30, the world loaded with custom world names.

Is there any logical explanation for this?

Asked by elcymon on 2017-12-14 04:04:27 UTC

Sounds like it could be this issue: https://bitbucket.org/osrf/gazebo/issues/2053/topic-name-mismatch-on-heavy-worlds-with

After the world is loaded, if you do gz topic -l, does it show some topics with the custom name and others with default?

Asked by chapulina on 2017-12-14 12:14:31 UTC

Yes it does show the topics with custom world name.

Asked by elcymon on 2017-12-14 12:29:28 UTC

Wait, all the topics have the custom name, or do some of them show default?

Asked by chapulina on 2017-12-14 13:20:18 UTC

You are right @chapulina. Some topics use the "custom world name" while others use "default"

Asked by elcymon on 2017-12-15 03:41:07 UTC

Ahh then that's the issue mentioned above. Unfortunately I don't think there is a fix yet, besides using the default world name.

Asked by chapulina on 2017-12-15 14:43:46 UTC

Answers