Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about additional wrapper group in simulated IMU configuration #667

Open
gabrielenava opened this issue Oct 18, 2023 · 1 comment

Comments

@gabrielenava
Copy link
Contributor

gabrielenava commented Oct 18, 2023

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?

@gabrielenava gabrielenava changed the title Additional wrapper tag Questions about additional wrapper tag in simulated IMU configuration Oct 18, 2023
@gabrielenava gabrielenava changed the title Questions about additional wrapper tag in simulated IMU configuration Question about additional wrapper tag in simulated IMU configuration Oct 18, 2023
@gabrielenava
Copy link
Contributor Author

cc @HosameldinMohamed @traversaro

@gabrielenava gabrielenava changed the title Question about additional wrapper tag in simulated IMU configuration Question about additional wrapper group in simulated IMU configuration Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant