-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Intro
Hi!
I am an automotive engineer and technical artist experimenting with Mujoco as the physics engine for real-time visualisation. Previously I have been using Bullet for this, but looking for better support of soft bodies in Mujoco.
You can see the state of my Bullet-based demo here: https://www.linkedin.com/posts/alan-ramsay-a50a8a5_autodesk-vred-bulletphysics-activity-7396634112872116224-JgRF?utm_source=share&utm_medium=member_desktop&rcm=ACoAAAEMmVwBk8WU7q3HVFdlZ90RkRU-gm0rSSU
My setup
Mujoco version 3.3.7
Using simulation.exe to test model development
Ryzen 9 9950X, Windows 11 Pro 25H2
What's happening? What did you expect?
Issue Observed:
- Using attach to add a flexcomp to my model gives a 'repeated name' error if another element with the same name has already been attached or included
- If there is no previous name to clash and prevent attachment, the attach does not generate the specified flex equality constraint for the bodies.
- I expect the prefix element of the attach to prevent name clashes, and for the flex equality constraint to be generated.
Possible Solution:
- Adding call mjCBase::NameSpace(m); in mjCFlex::Namespace on line 4033 of user_mesh.cc appears to solve this, let me know if I should submit a PR for that.
Steps for reproduction
- Load my_model.xml from the .zip using simulate.exe
- Comment out selected includes or attaches to see the interaction between them
- See summary in README.txt
- generated_softbody_include.xml shows successful parsing and generation of flexcomp by include
- generated_softbox_attach.xml shows the absence of prefixing and flex equality generated by attach
Minimal model for reproduction
Since this is specifically a multi-file issue, I've included xml files for reproduction in the attached .zip, please advise if there is a better way to provide this.
Code required for reproduction
N/A - using simulate.exe
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.