robotology / gazebo-yarp-plugins

Plugins to interface Gazebo with YARP.
33 stars 48 forks source link

Question about additional wrapper group in simulated IMU configuration #667

Open gabrielenava opened 1 year ago

gabrielenava commented 1 year ago

The old (MK1) iRonCub models still use a configuration file for the simulated IMU in Gazebo of this form:

[include "gazebo_icub_robotname.ini"]

[WRAPPER]
device multipleanalogsensorsserver
name /${gazeboYarpPluginsRobotName}/head/inertials
period 10

[ADDITIONAL_WRAPPER]
device inertial
name /${gazeboYarpPluginsRobotName}/inertial
period 0.01

[IMU_DRIVER]
device gazebo_imu

I have encountered the following issue:

[WARNING] GazeboYarpIMU : [WRAPPER] group not found in config file, maybe you are using the old version of the ini file, please update icub-gazebo
[WARNING] GazeboYarpIMU : trying to open it with the legacy behaviour device-subdevice
[ERROR] |yarp.os.YarpPluginSettings| Cannot find "inertial" plugin (not built in, and no .ini file found for it)Check that YARP_DATA_DIRS leads to at least one directory with plugins/inertial.ini or share/yarp/plugins/inertial.ini in it
[ERROR] |yarp.dev.PolyDriver|inertial| Could not find device <inertial>
[ERROR] GazeboYarpIMU Plugin Load failed: error in opening yarp driver
[DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Parameters are WRAPPER (device multipleanalogsensorsserver) (name "/icubSim/head/inertials") (period 10)
[INFO] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Created wrapper <multipleanalogsensorsserver>. See C++ class MultipleAnalogSensorsServer for documentation.
[ERROR] |yarp.os.YarpPluginSettings| Cannot find "inertial" plugin (not built in, and no .ini file found for it)Check that YARP_DATA_DIRS leads to at least one directory with plugins/inertial.ini or share/yarp/plugins/inertial.ini in it
[ERROR] |yarp.dev.PolyDriver|inertial| Could not find device <inertial>
[ERROR] GazeboYarpIMU Plugin Load failed: error in opening the yarp wrapper
[DEBUG] |yarp.dev.PolyDriver|gazebo_imu| Parameters are (device gazebo_imu) (sensorScopedName "default::iCub::head::head_imu_acc_1x1") (sensor_name head_imu_acc_1x1)
[INFO] |yarp.dev.PolyDriver|gazebo_imu| Created device <gazebo_imu>. See C++ class GazeboYarpIMUDriver for documentation.
[ERROR] GazeboYarpIMU Plugin Load failed: unable to view iMultipleWrapper interfaces
[DEBUG] |yarp.dev.PolyDriver|analogServer| Parameters are (device analogServer) (gazeboYarpPluginsRobotName icubSim) (gazeboYarpPluginsSensorName l_leg_ft_sensor) (name "/icubSim/left_leg/analog:o") (period 10)
[include "gazebo_icub_robotname.ini"]
name /${gazeboYarpPluginsRobotName}/head/inertials
period 10
device multipleanalogsensorsserver
subdevice gazebo_imu
Resetting YARP clock to default
[DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Parameters are WRAPPER (device multipleanalogsensorsserver) (name "/icubSim/xsens_inertial") (period 10)
[INFO] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Created wrapper <multipleanalogsensorsserver>. See C++ class MultipleAnalogSensorsServer for documentation.
[ERROR] GazeboYarpIMU : [ADDITIONAL_WRAPPER] group not found in config file
[DEBUG] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Parameters are WRAPPER (device multipleanalogsensorsserver) (name "/icubSim/head/inertials") (period 10)
[INFO] |yarp.dev.PolyDriver|multipleanalogsensorsserver| Created wrapper <multipleanalogsensorsserver>. See C++ class MultipleAnalogSensorsServer for documentation.
[ERROR] GazeboYarpIMU : [ADDITIONAL_WRAPPER] group not found in config file
[DEBUG] |yarp.dev.PolyDriver|analogServer| Parameters are (device analogServer) (gazeboYarpPluginsRobotName icubSim) (gazeboYarpPluginsSensorName l_leg_ft_sensor) (name "/icubSim/left_leg/analog:o") (period 10)
[ADDITIONAL_WRAPPER]
device multipleanalogsensorsserver
name /${gazeboYarpPluginsRobotName}/additionalWrapper/inertial
period 10

but in this way I have a duplicated port for inertia measurements which I don't need.

So the question is: is there a way to NOT use the additional wrapper if not needed?

gabrielenava commented 1 year ago

cc @HosameldinMohamed @traversaro