Skip to content

Question about additional wrapper group in simulated IMU configuration #667

@gabrielenava

Description

@gabrielenava

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:

  • if the model is opened in Gazebo with the configuration file as designed above, the IMU device fails to start with the following error:
[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)

  • if I replace the configuration file with the legacy behavior suggested in the IMU header, things work with no errors:
[include "gazebo_icub_robotname.ini"]
name /${gazeboYarpPluginsRobotName}/head/inertials
period 10
device multipleanalogsensorsserver
subdevice gazebo_imu

  • if I remove the [ADDITIONAL WRAPPER] group, the IMU fails to load:
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)
  • if I replace the device inside the additional wrapper group as follows, it works:
[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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions