robotology / gym-ignition

Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo

Home Page:https://robotology.github.io/gym-ignition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable the automatic loading of Gazebo Server plugins

diegoferigo opened this issue · comments

After gazebosim/gz-sim#281, if the SDF world file does not specify any plugin (such as physics, scene broadcaster, etc), the server will load a default set of plugins specified in a new server.config file.

This likely will alter the situation we were expecting before. In fact, we offer and use programmatic APIs to load world and model plugins. We don't expect any plugin to be loaded by default.

I still have to update my source installation (the PR was merged into dome with gazebosim/gz-sim#602 just yesterday). I hope that by exporting an empty IGN_GAZEBO_SERVER_CONFIG_PATH as documented here would suffice.

At first look, the server.config file is read when no plugins are specified in the following locations:

  • SDF world file
  • ServerConfig object passed to Server

Waiting to address , we rely on a workaround involving a singleton (-.-) to get the full simulation state, implemented as a plugin loaded through ServerConfig:

// Add the ECMProvider plugin for all worlds
for (size_t worldIdx = 0; worldIdx < root.WorldCount(); ++worldIdx) {
auto worldName = root.WorldByIndex(worldIdx)->Name();
config.AddPlugin(getECMPluginInfo(worldName));
}

I leave this issue open as reminder. Until we keep this workaround, no action is necessary. Exporting an empty IGN_GAZEBO_SERVER_CONFIG_PATH as documented would not harm, however now is is not yet strictly needed in our current situation.

Closed via #379.