Skip to content
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

[python/viewer] Load collada mesh with texture in Meshcat. #533

Merged
merged 2 commits into from
Jun 9, 2022

Conversation

duburcqa
Copy link
Owner

@duburcqa duburcqa commented Jun 8, 2022

No description provided.

@duburcqa duburcqa force-pushed the meshcat_texture branch 3 times, most recently from e8c1459 to 7ee7e2b Compare June 8, 2022 12:51
var handle_command = viewer.handle_command;
viewer.handle_command = function(cmd) {
viewer.handle_command = async function(cmd) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this command?

Copy link
Owner Author

@duburcqa duburcqa Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you port it back to MeshCat?
I think it can be helpful to many people beyond this project. Don't you think so?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@duburcqa duburcqa merged commit f8a0895 into dev Jun 9, 2022
@duburcqa duburcqa deleted the meshcat_texture branch June 9, 2022 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants