Skip to content

Fix: Support recursive/nested <include> tags in MJCF parser (#529)#532

Open
Ashutosh0x wants to merge 1 commit intogoogle-deepmind:mainfrom
Ashutosh0x:fix/nested-mjcf-include
Open

Fix: Support recursive/nested <include> tags in MJCF parser (#529)#532
Ashutosh0x wants to merge 1 commit intogoogle-deepmind:mainfrom
Ashutosh0x:fix/nested-mjcf-include

Conversation

@Ashutosh0x
Copy link

Resolves #529. This PR modifies the MJCF parser to support tags at any level of the XML hierarchy, not just the root. Previously, _parse only searched for include tags in xml_root, causing schema validation errors for nested includes (e.g., inside ). The fix uses xml_root.iter('include') to locate all occurrences and correctly removes them from their respective parents.

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.

mjcf parser only supports include at root level

1 participant