mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

Add installation of MuJoCo plugins as part of CMake installation logic

Open traversaro opened this issue 1 year ago • 1 comments

Some users in my lab found confusing the fact that simulate did not found the plugins out of the box if mujoco was built from source, and apparently also other users had the same confusion (see for example https://github.com/google-deepmind/mujoco/issues/723#issuecomment-1893594343).

This PR hopefully simplifies this by also installing as part of the CMake install step the mujoco plugins in ${CMAKE_INSTALL_PREFIX}/bin/mujoco_plugin, exactly where simulate expects to find them, and where they are placed in the official release binaries.

At the moment, I did not include this modifications for the case in which MUJOCO_BUILD_MACOS_FRAMEWORKS is ON, as it is not really clear to me how this should be handled. However, when building by source MUJOCO_BUILD_MACOS_FRAMEWORKS is set to OFF, so for all users that build from source, this PR ensure that the installed simulate will be able to find all the mujoco plugins out of the box.

fyi @francesco-romano

traversaro avatar Mar 15 '24 18:03 traversaro

I'm back at work now. Will see if we can finally get this merged.

saran-t avatar May 20 '24 17:05 saran-t