Extending Sphinx worlds

Hello there!

So far Sphinx is based on Gazebo, so in some way, everything that works for Gazebo should work for Sphinx. However, I have experienced myself that Sphinx loads slower for some Gazebo world configurations.

For example, given that $GAZEBO_ROOT points to the gazebo root folder and $SPHINX_ROOT works in a similar manner, when running sphinx $GAZEBO_ROOT/worlds/robocup_3Dsim.world $SPHINX_ROOT/drones/bebop2.drone, the script prints [Err] [Node.cc:106] No namespace found for a ~10s, then the Gazebo world boots.

However, when running worlds inside $SPHINX_ROOT/worlds instead of $GAZEBO_ROOT/worlds, these load in no time and show no errors tipically.

Then, how can I create a new world / extend from an existing one following Sphinx’s design?

Thanks in advance!

The issue here is that robocup_3Dsim.world contains models that are not locally available and must therefore be dowloaded from Parrot server and copied into ~/.gazebo/models during the first launch. The second time you launch sphinx should be much faster with the same world because the models it contains already exist locally.

Hey @ocrave,

Yep, that’s correct. However, my intentions were not only to run X world, but to be able to create and model Sphinx worlds in the easiest way possible.

To this end, I’ve come up with a “somewhat simple” way to replicate situations in a simulated world:

  1. I run Gazebo (not Sphinx) and create a world configuration, by taking advantage of the huuuuge model library that Sphinx gives (thanks for that guys :smiley:). It’s important to store this configuration in a .world file
  2. However, Sphinx predefined worlds don’t use the same SDF structure as original Gazebo ones. Thus, by making use of a world template I populate it with the previously-stored world configuration, basically adapting the world to the Sphinx format.

    Note: This is easier as Sphinx syntax to define object models only include an URI, a name and a pose.

This should be fine as to run the world with a drone. Moreover, if you want to add a pedestrian actor, it’s also fairly easy: a simple name pointer to the object works for defining the next goal the actor will take. For the sake of providing an example, here you have a world and a path to deploy an actor.

Hey, if you have more expertise at configuring your world, don’t mind to share some advice (or even your world creations :star_struck:); that’d be awesome!