[python/viewer] Load collada mesh with texture in Meshcat.#533
Conversation
e8c1459 to
7ee7e2b
Compare
|
|
||
| var handle_command = viewer.handle_command; | ||
| viewer.handle_command = function(cmd) { | ||
| viewer.handle_command = async function(cmd) { |
There was a problem hiding this comment.
You mean the patch of the original command ? It is necessary to wait for the required textures to finish loading before processing the original set_object command loading the geometry with materials in threejs. This design enables to send and load shared textures only once. It speeds up the initialization of the threejs view up to a factor 5 for robots like Atlas.
Besides, I'm also patching it to handle additional commands including bi-directional communication.
| super().__init__(vertices, faces) | ||
|
|
||
|
|
||
| class DaeMeshGeometryWithTexture(ReferenceSceneElement): |
There was a problem hiding this comment.
Could you port it back to MeshCat?
I think it can be helpful to many people beyond this project. Don't you think so?
There was a problem hiding this comment.
Yes, there is already a PR opened on the official meshcat-python repository meshcat-dev/meshcat-python#112. I'm getting involved but not contributing directly. I'm afraid it is going to take quite some time, mainly because the owner is quite reluctant to merge new contributions. It was more of a side project just to play around for a few hours and I'm not sure it is robust enough to be integrated in meshcat itself as is. I'm even considering dropping meshcat completely.
No description provided.