-
Notifications
You must be signed in to change notification settings - Fork 56
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
icub is not correctly loaded in the gepetto viewer #105
Comments
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 ? |
(btw, I found out that simple_humanoid just has no visual at all…) |
Yes, it did. I generated a few videos with Icub in the past. At the moment, I have no clue what is going on. |
Is it working well in MeshCat? What is the version of Pinocchio? |
Hi @jcarpent, Pinocchio version is Here when I try to view it with 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() |
The issue is coming from the iCub model within the project. |
Yes, I can try to deal with that. In this concern, the latest iCub model that is automatically generated from the cad is this one The model is different from the one currently stored in the
If you agree I can port the new version in the repo. |
As the old one does not look good in the viewer and we don't have time to investigate this issue, I would suggest removing it and replacing it with the proposed version. |
@nim65s @cmastalli Any feedback? |
No, please let's do not change the ICub model. We are using as a unittests in some repositories, this might trigger issues in other projects. What I would suggest is to investigate why this is broken, and then fix it. I haven't tried from my side now, but it used to work before. |
Also adding other mesh files (for a new ICub) will increase unnecessary the dimension of the repo. This project doesn't aim to integrate a particular model used in our experiments. Instead, it aims to have a set of robot models for prototyping, unittesting and teaching. |
I see two options:
|
I would go for the second to let people move forward. |
The problem is not the model, but the orientation of the mesh files. This can be easily fixed by adapting the URDF. I can provide a solution as soon I am available. But, unfortunately, I am extremely busy with other activities ATM. Let's do not discuss about the second option. |
Sorry @GiulioRomualdi, you will need to wait :( |
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 Just to understand if the problem is related to Pinocchio or the model stored within this repo, I try to load it with
this is the output |
Thanks @GiulioRomualdi for the nice report. So Pinocchio is NOT the issue. We are all safe then ;) |
mmmh actually no, |
Yes, you're right. I meant Pinocchio is NOT the issue. |
You know how they say, "great mind think alike". :D |
I am thinking that this might be related with an old bug in Gepetto viewer. This URDF model has not been changed from the first time in that I integrated and used it. |
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 👌 |
I know that this issue is pending for a long time. However, feel free anyone to propose a solution if this is blocking you. |
Hi all, I'm trying to visualize the
icub
stored in this repo.I installed the
gepetto gui
and theexample-robot-data
fromconda
.When I try to spawn
icub
with the following commandpython -m example_robot_data icub
I got this resultThis is the output of
conda list
commandIs this problem related to this issue stack-of-tasks/pinocchio#1471?
The text was updated successfully, but these errors were encountered: