An OpenSim plugin creating various reflex-like controllers for muscles
This is a fork of msdemers/opensim-reflex-controllers
that I updated to ensure it compiles against OpenSim 4.2 on Mac OSX. It is an OpenSim
plugin that adds support for the following reflex OpenSim::Controller
s:
- Path Stretch Reflexes (length and velocity)
- Fiber Stretch Reflexes (length and velocity)
- Delayed stretch reflexes (constant time offset)
Dependencies:
- A standard C/C++ compiler (clang, MSVC, gcc)
- CMake
- OpenSim (binaries, source - I built this against OpenSim4.2)
Build Scripts:
OS | Build Script |
---|---|
OSX | scripts/build_osx-catalina.sh |
Once you have built the library, you will can use it at the command line
(opensim-cmd
) like:
opensim-cmd -L /path/to/library.so <cmd>
Or in the GUI, which has some platform-dependent steps:
-
Windows: copy the library into the
plugins/
directory in your OpenSim install directory (e.g.C:\OpenSim 4.2\plugins
). Make theplugins/
directory if it doesn't already exist. Once you copy it there, boot up the GUI. You should be able to see the plugin inTools > User Plugins
-
Mac/Linux: boot up the GUI and use the ScriptingShell to load the plugin. Open the ScriptingShell tab (near the bottom) and type the path to the library without the file suffix (e.g. .dylib):
modeling.Model.LoadOpenSimLibrary("/path/to/library")
# e.g. modeling.Model.LoadOpenSimLibrary("/Applications/OpenSim 4.2/plugins/libReflexControllersPlugin")
- Mac/Linux (cont.): any loading errors will appear in the (separate)
Messages
tab. Check there if there's a problem