Retrieving error message after mj_compile fails (C API) #2621
Replies: 1 comment 2 replies
-
nvm, found "mjs_getError" just after posting (of course) |
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
Hello, I am interested in physics engines and starting to learn MuJoCo.
My setup
MuJoCo 3.2.2, C API, Windows
My question
Sometimes the model compilation fails and all I have is a null pointer, and no information about what went wrong.
I did setup mju_user_error and mju_user_warning but they are not called in this case.
Tracing the code, I see that the error message that would be useful for diagnostics is available in "modelC->errInfo" right before mj_compile returns:
But as far as I can tell that class is not visible from the user's side of the API, so that error cannot be accessed there. Is there a way to retrieve that error message? Or is there an error callback I missed, that would let me catch that error?
Thank you.
Minimal model and/or code that explain my question
No response
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions