robotology / icub-models

Official URDF and SDF models of the iCub humanoid robot.
Creative Commons Attribution Share Alike 4.0 International
33 stars 34 forks source link

Fix iCubGazeboV2_5_visuomanip colors #124

Closed traversaro closed 2 years ago

traversaro commented 2 years ago

The model iCubGazeboV2_5_visuomanip added in https://github.com/robotology/icub-models/pull/42 has strange "random" colors. For automatically generated models, the issue will be fixed by https://github.com/robotology/icub-models-generator/pull/217, but for iCubGazeboV2_5_visuomanip if we want to fix the issue we need to it specifically for this model.

fyi @xEnVrE @pattacini

pattacini commented 2 years ago

"Random" in which sense? Isn't the "standard" anonymous whitish color?

if we want to fix the issue we need to it specifically for this model.

Fine with me! Since @xEnVrE authored it, I'll leave to him the final choice.

xEnVrE commented 2 years ago

Hi @traversaro @pattacini,

fine with me. I imagine that I could check how the automatic pipeline changes the materials in the automatically generated models and apply the changes in the manually generated model.

@traversaro do you think this solution is doable? (I can take care of it.)

traversaro commented 2 years ago

"Random" in which sense? Isn't the "standard" anonymous whitish color?

Actually, not. The whitish color we were mostly used to is due to a bug in URDF parsing that was both in iDynTree and in Classic Gazebo, but if you displayed the model in a ROS tool like RViz you were always getting it as an "Arlecchino". @GiulioRomualdi is fixing the issue in iDynTree (see https://github.com/robotology/idyntree/pull/961), so we were going to see an arlecchino robot in iDynTree, but in Classic Gazebo we will continue to see a whitish color.

traversaro commented 2 years ago

Hi @traversaro @pattacini,

fine with me. I imagine that I could check how the automatic pipeline changes the materials in the automatically generated models and apply the changes in the manually generated model.

@traversaro do you think this solution is doable? (I can take care of it.)

Ok!

xEnVrE commented 2 years ago

I made the changes.

Some notes:

image

image

Eyes bulbs

I will use the idyntree-model-viewer to show you the eyes as the meshcat-based one does not support spheres and cylinders, that are used for the visual description of the eyes.

image

If this configuration looks good I can open a PR with the changes. @traversaro @pattacini

Btw, I noticed that using the idyntree visualizer the colors of hand and fingers are not taken into account. Is this because they are daes instead of stl?

pattacini commented 2 years ago

Fine with me 👍🏻

traversaro commented 2 years ago

(not sure why the red color was picked up for the entire robot, however I will leave it in order to have coherent colors w.r.t. the automatically generated colors)

Basically the one that do the modification get to choose the color, see https://github.com/robotology/icub-models-generator/pull/217#issuecomment-1024312288 . :D

Btw, I noticed that using the idyntree visualizer the colors of hand and fingers are not taken into account. Is this because they are daes instead of stl?

Yes, in the iDynTree visualizer .dae files can specify their own color inside the file itself, so the URDF color file is not taken into account. This is also the behaviour of Gazebo if I recall correctly.