robotology/icub-gazebo-grasping-sandbox

Spotted inaccurate reaching

Closed this issue · 15 comments

Bug description

While releasing the latest version, I've spotted that reaching is not as accurate as it was in the past.
Thus, further investigation should be required.

Steps to reproduce

Just run the demo.

Expected behavior

No response

Example repository

No response

Additional context

No response

xEnVrE commented

Hi @pattacini, thanks for letting me know.

Is this happening after the update to the latest distro release?

Is this happening after the update to the latest distro release?

Not sure about that but, given that the general idea behind the sandbox is reproducibility, I can easily roll it back to a previous distro. I'd only take some time to craft a systematic test.

By means of the test infrastructure I added via #46, I managed to perform some verifications with different distros.

Distro1 Pre-grasp pose error2 Grasp pose error2 Notes
v2022.09.1 (0.0087119, 1.56492) (0.00315036, 0.413285) ✔️
v2022.11.0 (0.00896821, 1.51956) (0.00316361, 0.435019) ✔️
v2023.02.0 (0.0348022, 4.04909) (0.00304989, 2.53692) ✖️
v2023.02.3 (0.0358665, 4.12649) (0.00316696, 2.6221) ✖️
v2023.05.0 (0.0356232, 4.11189) (0.00311436, 2.60816) ✖️

logs.zip

Clearly, something happened between v2022.11.0 and v2023.02.03.
I'll keep investigating these differences for YARP, ICUB, icub-models, yarp-gazebo-plugins...

cc @xEnVrE @Nicogene @traversaro

Footnotes

  1. Dependencies installed via Docker remain unvaried (e.g., Gazebo, Ipopt...), as does the sandbox. Only the packages installed via the robotology-superbuild change according to their releases.

  2. Errors are given as pairs (position [m], orientation [deg]). 2

  3. Errors may seem to remain small anyhow and grasps under test are indeed still successful. However, in different objects configuration, grasp fails miserably. Thus, I deem it worth looking at the errors already at this stage.

For the ICUB package: robotology/icub-main@v2.0.2...v2.1.0.
We don't have relevant changes (we just got rid of iCub_SIM) 👍🏻

For the GazeboYARPPlugins package: robotology/gazebo-yarp-plugins@v4.5.2...v4.6.0.
Changes are regarded with HandMk5CouplingHandler only 👍🏻

For the icub-models package: robotology/icub-models@v1.26.0...v2.0.0.
Changes look massive. I'd need to inquire about them deeper ❓

For the icub-models package: robotology/icub-models@v1.26.0...v2.0.0. Changes look massive. I'd need to inquire about them deeper ❓

By sticking to v2023.02.0 and downgrading only icub-models to v1.26.0, I got the following errors:

[ERROR] |yarp.dev.PolyDriver|controlboardwrapper2| Could not find device <controlboardwrapper2>
[ERROR] |gazebo-yarp-plugins.plugins.GazeboYarpControlBoard| wrapper did not open, load failed.

So, robotology/icub-models@v1.26.0...v2.0.0 involved prominently the use of the new NWS/NWC layers, whereas the deprecated device controlboardwrapper2 was removed right in yarp@3.8.0.

Also, I spotted this strange change in the model used by the sandbox:
...zeboV2_5_visuomanip/gazebo_icub_torso.ini → ...azeboV2_5_visuomanip/gazebo_icub_eyes.ini

Perhaps the related PR is robotology/icub-models#188 ?

Also, I spotted this strange change in the model used by the sandbox:
...zeboV2_5_visuomanip/gazebo_icub_torso.ini → ...azeboV2_5_visuomanip/gazebo_icub_eyes.ini

My hypothesis is that it was decided in v2.0.0 to use the torso conf params of the "official model", instead of sticking to their "manual" version as available in v1.26.0.

I'm going to verify it with a test.

I'm going to verify it with a test.

I can confirm that v2023.05.0 using these PID gains works nicely.

Here's the relevant log:

I0626 12:29:42.959769  6321 main.cpp:547] Reached pre-grasp position: -0.348 -0.138  0.011; error (m) = 0.00953425
I0626 12:29:42.959789  6321 main.cpp:548] Reached pre-grasp orientation: -0.291 -0.010  0.957  3.135; error (deg) = 1.47687
I0626 12:29:48.125125  6321 main.cpp:557] Reached grasp position: -0.351 -0.122 -0.034; error (m) = 0.00316552
I0626 12:29:48.125149  6321 main.cpp:558] Reached grasp orientation:  0.277  0.002 -0.961  3.136; error (deg) = 0.443076

I'll open up a PR for this.
cc @traversaro

I'll open up a PR for this.

Here it is:

Running the sandbox again in its normal configuration confirmed that the reaching is now as accurate as it was before.

To have the latest docker up-to-date, we need to wait until v2023.05.1 is available.

To have the latest docker up-to-date, we need to wait until v2023.05.1 is available.

See robotology/icub-models-generator#241 (comment).

To have the latest docker up-to-date, we need to wait until v2023.05.1 is available.

See robotology/icub-models-generator#241 (comment).

This issue should be solved via 2023.05.2.