Manual loading of plugins libraries fails via python api, but works fine via c++ api #2204
Open
2 tasks done
Labels
bug
Something isn't working
Intro
Hi!
I am a graduate student at TU Munich and the German Aerospace Center (DLR); I use MuJoCo to research elastic robots with variable stiffness actuators.
My setup
MuJoCo version: 2.3.4
API: Both (Plugin Development: C++, Using the model: Python)
Architecture: Arch Linux on 6.11.5 kernel
What's happening? What did you expect?
I have an actuator plugin compiled into a separate shared library (.so) and a model using that plugin. Different scenarios:
mj_loadPluginLibrary
/mj_loadAllPluginLibraries
or I use thesimulate
application and put the so wheresimulate
wants. This works fine! (so model and plugin should be okay)__init__.py
finds and loads it. This also works fine. (so it should generally work using the python API)mujoco.mj_loadPluginLibrary
/mujoco.mj_loadAllPluginLibraries
to load the plugin manual via the python API. This does not work. I see that the library registers the plugin. I have compiled a printout into the .so that prints a message before registering the plugin in themjPLUGIN_LIB_INIT
, and I see that message. However, it then fails on loading the XML model withValueError: XML Error: plugin vsa not found
.Steps for reproduction
mj_loadPluginLibrary
ormj_loadAllPluginLibraries
.Minimal model for reproduction
Code required for reproduction
Doing the above steps via the c++ API works on the same files. It also works via the python API when removing the
mj_loadPluginLibrary
call and placingmypluginlibrary.so
intomujoco/plugin
.Confirmations
The text was updated successfully, but these errors were encountered: