meshcat-dev / meshcat

Remotely-controllable 3D viewer, built on top of three.js
MIT License
256 stars 48 forks source link

Manipulating parts. How? #107

Closed shurko0x4cfd closed 2 years ago

shurko0x4cfd commented 3 years ago

Hello. I have a question. Is there an easy way to manipulate not the whole object, but its parts. For example, I added a structured object (human) to the scene using set_object. I cannot manipulate his hand through the meshcat/human/left_hand path or whatever. How to manipulate individual parts?

rdeits commented 3 years ago

I've you've added a single geometry via set_object, then meshcat will treat that as a rigid structure, in which case there's no way to move individual parts of the geometry independently. Creating a mechanism with moving parts requires that each component be a separate geometry published with separate set_object and set_transform calls. As an example, that's how https://github.com/JuliaRobotics/MeshCatMechanisms.jl works: It loads a robot model and then publishes each body independently, allowing them to be moved and animated.

shurko0x4cfd commented 2 years ago

Thanks for the answer.