diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3a3b351..68b8557a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ### Fixed - Removed `getLastInputStamp` method from `LaserSensorDriver` class in `gazebo_yarp_lasersensor`. Furthermore, fix bug in `gazebo_yarp_lasersensor`, by adding the update to the variable `m_timestamp` inherited from `yarp::dev::Lidar2DDeviceBase` (https://github.com/robotology/gazebo-yarp-plugins/pull/604). +- Fix use of yarpConfigurationString parameter in `gazebo_yarp_worldinterface` plugin (https://github.com/robotology/gazebo-yarp-plugins/pull/609). ## [4.1.2] - 2022-01-19 diff --git a/plugins/worldinterface/src/worldinterface.cpp b/plugins/worldinterface/src/worldinterface.cpp index b1979c782..c250c562c 100644 --- a/plugins/worldinterface/src/worldinterface.cpp +++ b/plugins/worldinterface/src/worldinterface.cpp @@ -12,6 +12,7 @@ #include #include #include +#include using namespace gazebo; using namespace std; @@ -54,18 +55,7 @@ void WorldInterface::Load(physics::ModelPtr _model, sdf::ElementPtr _sdf) //pass reference to server m_wi_server.attachWorldProxy(&m_proxy); - //Getting .ini configuration file from sdf - bool configuration_loaded = false; - - if (_sdf->HasElement("yarpConfigurationFile")) { - std::string ini_file_name = _sdf->Get("yarpConfigurationFile"); - std::string ini_file_path = gazebo::common::SystemPaths::Instance()->FindFileURI(ini_file_name); - - if (ini_file_path != "" && m_parameters.fromConfigFile(ini_file_path.c_str())) { - yInfo() << "Found yarpConfigurationFile: loading from " << ini_file_path ; - configuration_loaded = true; - } - } + bool configuration_loaded = GazeboYarpPlugins::loadConfigModelPlugin(_model, _sdf, m_parameters); if (!configuration_loaded) { yError() << "WorldInterface::Load error could not load configuration file";