-
Notifications
You must be signed in to change notification settings - Fork 19
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
direct mujo'co control ? #12
Comments
Just gathering some relevant comments on this: From the official Unity Plugin docs:
google-deepmind/dm_control#54 (comment) :
google-deepmind/mujoco#364 (comment) :
So it seems like this might become possible soon. (Also, the title of this issue should be changed to something more descriptive like "Possible to add/remove objects on the fly?") |
It would basically require creating a copy of the current MuJoCo simulation state, but with the desired objects added or removed. It's possible, but a bit of a pain the butt... it would need a function to manually step through all the objects in a scene, and correctly copy them and their secondary simulation elements (+ indices!) over. Kind of like merging two meshes together into one mesh and keeping the triangle indices sorted, but with like a hundred indexed attributes.... The best idea might be to autogen this function given the metadata that is present in the Python Binding Generator... all the fields of mj_model and mj_state and their relative struct sizes are all present... |
@zalo Did you see the quote in my comment that suggests that the MuJoCo team are working on supporting dynamically-added objects? Seems like it might just be worth waiting for them to implement that? (btw, your comment brings to mind morphdom, but I haven't looked into it enough to know whether it works on arbitrary xml/html, or requires actual DOM object and browser API stuff - guessing the latter) |
Yeah, but I'm not holding my breath for an H1 2023 release 😅
I'm a little averse to going through the XML representation, since (while it does dramatically simplify the implementation) it's way slower than one would expect for simple object addition/subtraction... and, while I'd love it if lo-th added MuJoCo to Phy, there are enough idiosyncrasies with the way MuJoCo does things, that I doubt that this would be a drop-in implementation... Besides, he already has Havok and PhysX in there, which are extremely solid engines 😎 |
Hi very cool libs
just for info
is possible to add or remove object on fly ?
or is only xml init scene .
The text was updated successfully, but these errors were encountered: