You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and replicate, MjSpec segfaults with seemingly not-directly-related factor of using the same name of "!!" in two places in the code below. Note that actually !! does not exist in child_2.xml, and can be any string. A more legit use case is replacing !! with the existing body 2, but segfaults anyway.
Hi, I think the issue is that you are using the same prefix twice, which leads to duplicated names. But we should add some better error control to prevent the segfault.
Replicate adds the suffix but in your case the attach happens before the replicate. As @quagla says, the correct behavior should be either an error upon attach, or a duplicate name error upon compile. We will definitely try to reproduce what you are seeing, in the meantime, could you check if having different prefixes (in parent.xml) solves the problem?
Yes, of course, having different prefixes solves this problem immediately. But for a complex scene, we used to group objects into categories with this prefix. Thinking of and organizing many prefixes is a pain 😢
But restrict the scope to this issue, I'm not seeking any change in current attach behavior: it is enough to provide a more user friendly error instead of a segfault.
That said, two things still feel a bit unergonomic here:
Replicate adds the suffix but in your case the attach happens before the replicate, but attaching a non-existent name may not pass checks in the first place. (However it segfaults in this case)
Changing "!!" to "2", removing the replicate wrapper, such that there are truely duplicate body names, "fixes" the segfault, though the model is silently wrong.
Intro
Hi!
I am a graduate student at HKU, I use MuJoCo for my research on robotic manipulation.
My setup
MuJoCo 3.3.0, Python and C, Linux
What's happening? What did you expect?
With an attach hierarchy of
and replicate, MjSpec segfaults with seemingly not-directly-related factor of using the same name of
"!!"
in two places in the code below. Note that actually!!
does not exist inchild_2.xml
, and can be any string. A more legit use case is replacing!!
with the existing body2
, but segfaults anyway.Steps for reproduction
See code below.
Minimal model for reproduction
parent.xml
child_1.xml
child_2.xml
Code required for reproduction
Confirmations
The text was updated successfully, but these errors were encountered: