-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to build code that uses mjCModel
?
#388
Comments
We should've mentioned it in the previous issue, but this isn't a bug. We deliberately avoid exposing a C++ ABI in our precompiled library. If you want to experiment with mjCModel, you'll need to build MuJoCo from source alongside your own code. I'll rephrase the issue title, but leave it open so that you can ask more questions about this if necessary. |
mjCModel
?
Ok thanks for the explanation. But there is one more problem though, you need to add |
That's true, but we are hesitant to export symbols that might change/disappear in the future. |
A possibly better alternative is to statically link MuJoCo into your program, and build everything without |
@saran-t Does this mean the CMakeLists.txt in the mujoco repo should be modified to include other packages for our / my own personal projects? I've been trying to include the mujoco library in my C++ project with my own CMakeLists.txt. Bringing mujoco into my project is not doable? I'm just trying to get a clear picture of what to do. |
@BenjaminNavarro @yuvaltassa |
@MotorCityCobra this is only about trying to depend on MuJoCo's currently private, internal API, rather than functions that are meant to be user-facing. To answer your question, to depend on MuJoCo in CMake, you should |
Maybe you could add a CMake option to export the private API or not? Default would be off of course to keep the current behavior but it would make it easy to just build and use MuJoCo as usual |
I believe this has been superseded by MjSpec. |
As advised to me in #364 I tried to use mjCModel to build a model pragramatically.
However I get some undefined reference errors to some mjCModel member functions.
After some investigation, it seems that these symbols are indeed missing from the distributed shared libs, at least on linux x64.
On the downloaded .so, nm gives me:
But if I compile the mujoco myself and run nm on the resulting .so I get this instead:
The text was updated successfully, but these errors were encountered: