[mj_parseXMLString] How to specify mjSpec.modelfiledir #2339
Replies: 1 comment 2 replies
-
I think this https://github.com/google-deepmind/mujoco/blob/main/test/xml/xml_native_reader_test.cc#L1618 is an example of what you are asking for? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi MuJoCo team,
I am a graduate student, trying to programmingly load robot model from separate component XML files.
My setup
MuJoCo 3.2.7, C, Ubuntu 22.04
My question
mj_parseXML allows a
filename
to be specified, from which the outputspec's modelfiledir
as the parent folder is determined throughFileGetDir()
.However, for mj_parseXMLString, since only the direct XML string is received, is there a way to specify
modelfiledir
in order to load an XML string that includes a relative path to another XML file?If no, so does it mean we have to use an absolute path for the included file?
Thank you!
Minimal model and/or code that explain my question
No response
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions