Open nmansard opened 3 years ago
Are you still having trouble?
I'm having different problems with .dae
files, as described here:
https://github.com/stack-of-tasks/pinocchio/issues/1475
I haven't had any problem loading the .dae
files for the ur5 from the ur_description package from the Universal Robots repository, but I'll try loading all the UR5 meshes from example-robot-data
later today and post the results here.
The MeshCat direct loads from example-robot-data
work fine for me (red parts):
Having problems with the Pinocchio viewer versions, still trying to track that down.
Code:
The above issue is fixed in Pinocchio 2.9.1
and is not a MeshCat issue per se.
@nmansard I just upgraded to meshcat-python 0.3.1
via conda-forge
(on Windows) and now I can no longer see most of the links for the example-robot-data
meshes for the UR robots.
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]))
I can only see base and wrist3
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7004/static/
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/base.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/forearm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/shoulder.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/upperarm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist1.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist2.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist3.dae
Seems like the links are all there
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7005/static/
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/finger.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/hand.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link0.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link1.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link2.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link3.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link4.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link5.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link6.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/panda_description/meshes/visual/link7.dae
I also have this problem with the ur_description
meshes from the Universal Robots repository. Obviously something wrong with them with respect to meshcat.
Will update if I can find a solution.
Reproduced this in fresh Conda enviroments with meshcat-python 0.1.1
and 0.3.1
.
System is Windows 11, Google Chrome, Python 3.8
Python code snippet
Ran the above in a Jupyter notebook.
meshcat-python 0.1.1
in mc011viztest
EnvironmentConda Environment YAML
Resulting Conda Environment
Result
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7000/static/
Visualizing with Meshcat 0.1.1 in environment mc011viztest
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/base.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/forearm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/shoulder.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/upperarm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist1.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist2.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist3.dae
JS Console Output - Chrome
A number of Javascript warnings but no errors, details below.
meshcat-python 0.3.1
in mc031viztest
EnvironmentConda Environment YAML
Resulting Conda Environment
Result
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7000/static/
Visualizing with Meshcat 0.3.1 in environment mc031viztest
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/base.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/forearm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/shoulder.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/upperarm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist1.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist2.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist3.dae
JS Console Output - Chrome
A number of TypeError
errors from mergeBufferGeometries()
(here I guess), details below.
Same result as above on Ubuntu 20.04 running on WSL (Linux-5.10.43.3-microsoft-standard-WSL2-x86_64-with-glibc2.10
), rendering in Firefox.
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 0.2.0
fixes the problem for me.
Seems like this is related to meshcat/pull/99
My Conda-installed version of meshcat-python 0.3.1
still imports BufferGeometryUtils
in index.js
Modifying line 4 and line 39 in index.js
to match meshcat/pull/99 and rebuilding main.min.js
according to the instructions fixes the problem.
You can open the visualizer by visiting the following URL:
http://127.0.0.1:7002/static/
Visualizing with Meshcat 0.3.1 in environment mc031viztest on Windows-10-10.0.22000-SP0
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/base.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/forearm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/shoulder.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/upperarm.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist1.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist2.dae
https://gepgitlab.laas.fr/gepetto/example-robot-data/-/raw/master/robots/ur_description/meshes/ur5/visual/wrist3.dae
What is the status of this issue?
I cannot display ANYmal (using https://github.com/Gepetto/example-robot-data) properly. See the picture for more details:
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.