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

asked 2017-12-13 06:48:57 -0500

elcymon gravatar image

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

edit retag flag offensive close merge delete

Comments

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

chapulina gravatar imagechapulina ( 2017-12-13 10:03:13 -0500 )edit

Also, what Gazebo version are you using?

chapulina gravatar imagechapulina ( 2017-12-13 10:03:58 -0500 )edit

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?

elcymon gravatar imageelcymon ( 2017-12-14 03:04:27 -0500 )edit

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?

chapulina gravatar imagechapulina ( 2017-12-14 11:14:31 -0500 )edit

Yes it does show the topics with custom world name.

elcymon gravatar imageelcymon ( 2017-12-14 11:29:28 -0500 )edit

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

chapulina gravatar imagechapulina ( 2017-12-14 12:20:18 -0500 )edit

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

elcymon gravatar imageelcymon ( 2017-12-15 02:41:07 -0500 )edit

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

chapulina gravatar imagechapulina ( 2017-12-15 13:43:46 -0500 )edit