robotology / icub-models-generator

Resources and programs to generated models (URDF, SDF) of the iCub robot
14 stars 23 forks source link

Update xsens root_link imu configuration file in order to publish correctly with iCubGazeboV2_7 #246

Closed martinaxgloria closed 1 year ago

martinaxgloria commented 1 year ago

This PR fixes https://github.com/robotology/icub-models-generator/issues/245

The updates introduced with https://github.com/robotology/icub-models-generator/pull/231 don't affect the xsens on the root link. This causes errors when iCubGazeboV2_7 model is loaded on gazebo:

[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
traversaro commented 1 year ago

Thanks @martinaxgloria ! Are you sure that this PR fixes https://github.com/robotology/icub-models-generator/issues/245 ? In particular, it is not clear to me how the measure of the IMU is published for the xsens root_link IMU in this case.

martinaxgloria commented 1 year ago

Sorry @traversaro, I mean that with these changes the errors mentioned above disappear. I attach here the log:

martinaxgloria commented 1 year ago

As a workaround, @Nicogene proposed to do the changes reported in https://github.com/robotology/icub-models-generator/commit/17308608b782b61783cab499da9b2a12e551d490. I tried to launch in Gazebo both iCubGazeboV2_5 and V2_7 and it seems to work.

cc @traversaro @Nicogene

traversaro commented 1 year ago

Did you try if this is actually working? I am afraid we are hardcoding inertial in gazebo-yarp-plugins .

traversaro commented 1 year ago

Did you try if this is actually working? I am afraid we are hardcoding inertial in gazebo-yarp-plugins .

Actually, we should be good to go : https://github.com/robotology/gazebo-yarp-plugins/blob/0fd9300b583267c7bff4fb2be7fe82700ddeb613/plugins/imu/src/IMU.cc#L98 , but perhaps we should put this in the WRAPPER group?

Nicogene commented 1 year ago

Did you try if this is actually working? I am afraid we are hardcoding inertial in gazebo-yarp-plugins .

Actually, we should be good to go : robotology/gazebo-yarp-plugins@0fd9300/plugins/imu/src/IMU.cc#L98 , but perhaps we should put this in the WRAPPER group?

Maybe we need to set disableImplicitWrapper?

martinaxgloria commented 1 year ago

Actually, we should be good to go : https://github.com/robotology/gazebo-yarp-plugins/blob/0fd9300b583267c7bff4fb2be7fe82700ddeb613/plugins/imu/src/IMU.cc#L98 , but perhaps we should put this in the WRAPPER group?

Actually, this warning message is printed out but it doesn't cause the yarprobotinterface to close. I attach here the log:

iCubGazeboV2_7.log

And xsens data were published correctly on the port.

traversaro commented 1 year ago

Perfect!

traversaro commented 1 year ago

I opened https://github.com/robotology/icub-models-generator/issues/247 to track a proper solution.