example-robot-data: icub is not correctly loaded in the gepetto viewer

Hi all, I’m trying to visualize the icub stored in this repo. I installed the gepetto gui and the example-robot-data from conda. When I try to spawn icub with the following command python -m example_robot_data icub I got this result

2021-10-12 18-14-58

This is the output of conda list command

# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                      1_llvm    conda-forge
alsa-lib                  1.2.3                h516909a_0    conda-forge
assimp                    5.0.1                hedfc422_6    conda-forge
boost                     1.74.0           py39h5472131_3    conda-forge
boost-cpp                 1.74.0               h312852a_4    conda-forge
bzip2                     1.0.8                h7f98852_4    conda-forge
c-ares                    1.17.2               h7f98852_0    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
collada-dom               2.5.0                h1713cda_4    conda-forge
console_bridge            1.0.1                h4bd325d_0    conda-forge
dbus                      1.13.6               h48d8840_2    conda-forge
eigen                     3.4.0                h4bd325d_0    conda-forge
eigenpy                   2.6.8           py39h5aed9d1_10    conda-forge
example-robot-data        3.11.0           py39h1a9c180_0    conda-forge
expat                     2.4.1                h9c3ff4c_0    conda-forge
ffmpeg                    4.3.2                hca11adc_0    conda-forge
fontconfig                2.13.1            hba837de_1005    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
gepetto-viewer            4.11.0               h02473c3_1    conda-forge
gepetto-viewer-corba      5.5.1            py39he0596dd_5    conda-forge
gettext                   0.19.8.1          h73d1719_1008    conda-forge
glib                      2.68.4               h9c3ff4c_1    conda-forge
glib-tools                2.68.4               h9c3ff4c_1    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gnutls                    3.6.13               h85f3911_1    conda-forge
gst-plugins-base          1.18.5               hf529b03_0    conda-forge
gstreamer                 1.18.5               h76c114f_0    conda-forge
hpp-fcl                   1.7.7            py39hbcdfc36_2    conda-forge
icu                       68.1                 h58526e2_0    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jpeg                      9d                   h36c2ea0_0    conda-forge
krb5                      1.19.2               hcc1bbae_2    conda-forge
lame                      3.100             h7f98852_1001    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      2.2.1                h9c3ff4c_0    conda-forge
libblas                   3.9.0           11_linux64_openblas    conda-forge
libcblas                  3.9.0           11_linux64_openblas    conda-forge
libclang                  11.1.0          default_ha53f305_1    conda-forge
libcurl                   7.79.1               h2574ce0_1    conda-forge
libdeflate                1.7                  h7f98852_5    conda-forge
libedit                   3.1.20191231         he28a2e2_2    conda-forge
libev                     4.33                 h516909a_1    conda-forge
libevent                  2.1.10               h9b69904_4    conda-forge
libffi                    3.4.2                h9c3ff4c_4    conda-forge
libgcc-ng                 11.2.0              h1d223b6_10    conda-forge
libgfortran-ng            11.2.0              h69a702a_10    conda-forge
libgfortran5              11.2.0              h5c6108e_10    conda-forge
libglib                   2.68.4               h174f98d_1    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
libjpeg-turbo             2.1.1                h7f98852_0    conda-forge
liblapack                 3.9.0           11_linux64_openblas    conda-forge
libllvm11                 11.1.0               hf817b99_2    conda-forge
libnghttp2                1.43.0               h812cca2_1    conda-forge
libogg                    1.3.4                h7f98852_1    conda-forge
libopenblas               0.3.17          pthreads_h8fe5266_1    conda-forge
libopus                   1.3.1                h7f98852_1    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libpq                     13.3                 hd57d9b9_1    conda-forge
libssh2                   1.10.0               ha56f1ee_2    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_10    conda-forge
libtiff                   4.3.0                hf544144_1    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libvorbis                 1.3.7                h9c3ff4c_0    conda-forge
libwebp-base              1.2.1                h7f98852_0    conda-forge
libxcb                    1.13              h7f98852_1003    conda-forge
libxkbcommon              1.0.3                he3ba5ed_0    conda-forge
libxml2                   2.9.12               h72842e0_0    conda-forge
libzlib                   1.2.11            h36c2ea0_1013    conda-forge
llvm-openmp               12.0.1               h4bd325d_1    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
mysql-common              8.0.25               ha770c72_2    conda-forge
mysql-libs                8.0.25               hfa10184_2    conda-forge
ncurses                   6.2                  h58526e2_4    conda-forge
nettle                    3.6                  he412f7d_0    conda-forge
nspr                      4.30                 h9c3ff4c_0    conda-forge
nss                       3.69                 hb5efdd6_1    conda-forge
numpy                     1.21.2           py39hdbf815f_0    conda-forge
octomap                   1.9.7                h4bd325d_0    conda-forge
omniorb                   4.2.4            py39hff7568b_5    conda-forge
omniorb-libs              4.2.4                h812cca2_5    conda-forge
omniorbpy                 4.2.4            py39he3720c4_2    conda-forge
openh264                  2.1.1                h780b84a_0    conda-forge
openscenegraph            3.6.5               h605fd04_11    conda-forge
openscenegraph-osgqt      3.5.7                h9ba741d_3    conda-forge
openssl                   1.1.1l               h7f98852_0    conda-forge
pcre                      8.45                 h9c3ff4c_0    conda-forge
pinocchio                 2.6.3            py39hbcdfc36_2    conda-forge
pip                       21.3               pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
python                    3.9.7           hb7a2778_3_cpython    conda-forge
python_abi                3.9                      2_cp39    conda-forge
qhull                     2020.2               h4bd325d_2    conda-forge
qt                        5.12.9               hda022c4_4    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
setuptools                58.2.0           py39hf3d152e_0    conda-forge
sqlite                    3.36.0               h9cd32fc_2    conda-forge
tinyxml                   2.6.2                h4bd325d_2    conda-forge
tk                        8.6.11               h27826a3_1    conda-forge
tzdata                    2021c                he74cb21_0    conda-forge
urdfdom                   2.3.5                h4bd325d_0    conda-forge
urdfdom_headers           1.0.5                h4bd325d_2    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
x264                      1!161.3030           h7f98852_1    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zlib                      1.2.11            h36c2ea0_1013    conda-forge
zstd                      1.5.0                ha95c52a_0    conda-forge

Is this problem related to this issue https://github.com/stack-of-tasks/pinocchio/issues/1471?

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Confirming from independent tests with yourdfpy that the iCub URDF in example-robot-data has a mesh orientation issue.

The one from https://github.com/robotology/icub-models/blob/9e91a7d7d09b4cf2c405f9b471965f6a6c3bab19/iCub/robots/iCubGazeboV2_5/model.urdf is fine 👌

Or iDynTree and Pinocchio have the same bug 🥲

You know how they say, “great mind think alike”. 😄

Yes, you’re right. I meant Pinocchio is NOT the issue.

I’ve just tried to load the new iCub model and everything works fine (except for the colors but this is a known issue in the urdf @traversaro)

image

Just to understand if the problem is related to Pinocchio or the model stored within this repo, I try to load it with iDynTree running the following command

idyntree-model-view -m icub.urdf

this is the output

image

Sorry @GiulioRomualdi, you will need to wait 😦

Hi @jcarpent, Pinocchio version is 2.6.3

Here when I try to view it with MeshCat image

This is the script I used

import pinocchio as pin
import numpy as np
import sys
import os
from os.path import dirname, join, abspath

from pinocchio.visualize import MeshcatVisualizer

# Load the URDF model.
# Conversion with str seems to be necessary when executing this file with ipython
pinocchio_model_dir = os.getenv("ROBOTPKG_BASE")

model_path = join(pinocchio_model_dir,"share/example-robot-data/robots")
mesh_dir = pinocchio_model_dir
urdf_filename = "icub_reduced.urdf"
urdf_model_path = join(join(model_path,"icub_description/robots"),urdf_filename)

model, collision_model, visual_model = pin.buildModelsFromUrdf(urdf_model_path, mesh_dir, pin.JointModelFreeFlyer())

viz = MeshcatVisualizer(model, collision_model, visual_model)

# Start a new MeshCat server and client.
# Note: the server can also be started separately using the "meshcat-server" command in a terminal:
# this enables the server to remain active after the current script ends.
#
# Option open=True pens the visualizer.
# Note: the visualizer can also be opened seperately by visiting the provided URL.
try:
    viz.initViewer(open=True)
except ImportError as err:
    print("Error while initializing the viewer. It seems you should install Python meshcat")
    print(err)
    sys.exit(0)

# Load the robot in the viewer.
viz.loadViewerModel()

# Display a robot configuration.
q0 = pin.neutral(model)
viz.display(q0)
viz.displayCollisions(False)
viz.displayVisuals(True)

input()

(btw, I found out that simple_humanoid just has no visual at all…)

Hi,

I can reproduce this issue in a totally different environment, but not with any other robot from this package (I tried with all of them). So I guess this is an issue in the URDF or SRDF of icub. I never used this robot. @cmastalli : did this ever work correctly for you ?