-
Notifications
You must be signed in to change notification settings - Fork 63
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
Silent problem when loading or displaying DAE files #84
Comments
Are you still having trouble? I'm having different problems with I haven't had any problem loading the |
The MeshCat direct loads from Having problems with the Pinocchio viewer versions, still trying to track that down. Code:
|
The above issue is fixed in Pinocchio |
@nmansard I just upgraded to Small self-contained example that fetches the meshes from the URL: import meshcat
import urllib
import io
viz = meshcat.Visualizer()
viz.open()
robot = 'panda' #panda or ur5
if robot == 'ur5':
links = ['base', 'forearm', 'shoulder', 'upperarm', 'wrist1', 'wrist2', 'wrist3']
url_template = r'https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/{0}.dae'
elif robot == 'panda':
links = ['finger', 'hand'] + [f'link{n}' for n in range(0, 8)]
url_template = r'https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/{0}.dae'
for n, linkname in enumerate(links):
url = url_template.format(linkname)
print(url)
with urllib.request.urlopen(url) as urf:
xml_str = ''.join([line.decode('utf-8') for line in urf])
with io.StringIO(xml_str) as xml_iofile:
geom = meshcat.geometry.DaeMeshGeometry.from_stream(xml_iofile)
viz[linkname].set_object(geom)
viz[linkname].set_transform(meshcat.transformations.translation_matrix([0, 0, n/5.0])) UR5 ResultI can only see base and wrist3
Panda ResultSeems like the links are all there
I also have this problem with the Will update if I can find a solution. |
Reproduced this in fresh Conda enviroments with System is Windows 11, Google Chrome, Python 3.8 Python code snippet import meshcat
import urllib
import io
import os
from importlib.metadata import version
viz = meshcat.Visualizer()
viz.open()
robot = 'ur5' #panda or ur5
if robot == 'ur5':
links = ['base', 'forearm', 'shoulder', 'upperarm', 'wrist1', 'wrist2', 'wrist3']
url_template = r'https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/{0}.dae'
elif robot == 'panda':
links = ['finger', 'hand'] + [f'link{n}' for n in range(0, 8)]
url_template = r'https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/{0}.dae'
conda_env = os.environ['CONDA_DEFAULT_ENV']
meshcat_ver = version('meshcat')
print(f'Visualizing with Meshcat {meshcat_ver} in environment {conda_env}')
for n, linkname in enumerate(links):
url = url_template.format(linkname)
print(url)
with urllib.request.urlopen(url) as urf:
xml_str = ''.join([line.decode('utf-8') for line in urf])
with io.StringIO(xml_str) as xml_iofile:
geom = meshcat.geometry.DaeMeshGeometry.from_stream(xml_iofile)
viz[linkname].set_object(geom)
viz[linkname].set_transform(meshcat.transformations.translation_matrix([n/5.0, 0, 0])) Ran the above in a Jupyter notebook. Testing
|
Same result as above on Ubuntu 20.04 running on WSL ( The Firefox console error message seems a little more informative Uncaught TypeError: three_examples_jsm_utils_BufferGeometryUtils_js__WEBPACK_IMPORTED_MODULE_2__.BufferGeometryUtils is undefined
merge_geometries http://127.0.0.1:7000/static/main.min.js:2
handle_special_geometry http://127.0.0.1:7000/static/main.min.js:2
delegate http://127.0.0.1:7000/static/main.min.js:2
parseGeometries http://127.0.0.1:7000/static/main.min.js:2
parse http://127.0.0.1:7000/static/main.min.js:2
set_object_from_json http://127.0.0.1:7000/static/main.min.js:2
handle_command http://127.0.0.1:7000/static/main.min.js:2
handle_command_bytearray http://127.0.0.1:7000/static/main.min.js:2
handle_command_message http://127.0.0.1:7000/static/main.min.js:2
onmessage http://127.0.0.1:7000/static/main.min.js:2 I don't have a native Linux machine around to try. Reverting to |
Seems like this is related to meshcat/pull/99 My Conda-installed version of Modifying line 4 and line 39 in
|
What is the status of this issue? I cannot display ANYmal (using https://github.com/Gepetto/example-robot-data) properly. I am using Pinocchio v2.6.7 |
Hi all. Thanks again for the contribution you are bringing with MeshCat.
I have a problem when loading some DAE files, for example the forearm of the UR5 as available here:
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/upperarm.dae
The DAE seems to be properly parsed, and no warning or error is displayed. Yet it does not show in the viewer. Trying the same code on the corresponding STL file (for example obtained by converting it with osgconv) works like a charm.
Am I doing something incorrect? If not, would you have some directions for me to investigate the problem?
Thanks in advance.
The text was updated successfully, but these errors were encountered: