Frequently asked question are broken up into 5 categories:
It also contains quicklinks to the following buzz words (not all questions have buzz words):
Mac | Launch Error | SIMM Model | Bone/Geometry Files | .vtp Files | Muscle Points | C-3D Files | OpenSim Plotter | Exporting Data | RRA Settings | Computing Muscle Forces | Synergistic Muscles | BIODEX Data | Magnitude of Muscle Forces | Dynamic Analysis
Q. Does OpenSim work on a Mac?
A. The name OpenSim refers to two distinct entities, the OpenSim API (which is a C++ library of classes used for modeling and simulation of biological structures in Biomechanics) and the OpenSim application (GUI) which builds on the OpenSim API. As of version 2.2, the only distribution of the GUI is on Windows (32Bit). Although there has been experimental builds of the GUI on Mac/Linux there's no public distribution.
The API (headers, libraries and Doxygen documentation) is available for both Windows (32Bit), Mac & Linux (32Bit) and is available on the downloads page. To use the API, users will need to write a main program or a plugin or use the various tools provided as command line executables to perform modeling/simulation.
Mac users, who want to use the GUI, have successfully ran OpenSim using Bootcamp, Virtual Machines or other environments that simulate Windows on Mac.
Mac and Linux users will need to add the installation-folder/bin to their environment (LD_LIBRARY_PATH on linux, DYLD_LIBRARY_PATH on mac) and can use the command line utilities or build main programs using the API following instructions similar to those given in the developer's guide for Windows.
If you're interested in helping to build a GUI distribution on Mac, Linux or any other platform, please contact the development team using the developers forum at https://simtk.org/forum/forum.php?forum_id=283
Q. Why do I see a big red ball when I launch OpenSim?
Q. I installed the application but when I launch it I get "Required library failed to load. Check that the dynamic library osimJavaJNI is in your PATH". What could be wrong?
A. You likely picked not to add OpenSim to your PATH while doing installation. If this is the case you can fix it by either reinstalling or adding the directory where you installed OpenSim to your PATH Environment variable. To check if OpenSim is already in the PATH, open a command prompt shell on windows and type C:\>echo %PATH% You should see the installation-directory/bin in the list of directories.
Q. I imported a model from SIMM but the bones don't show up what's wrong?
A. You likely are missing the bone files that go with your model, try reimporting with the bones located in a directory under your .jnt file.
Q. How do I tell OpenSim where to locate the bone/geometry files.
A. Open Edit/Preferences and edit the entry for "Geometry Path" which is a semicolon separated list of directories and add the path you want to it.
Q. What are .vtp files?
A. These are the geometry files corresponding to the bones and other objects used by your model. The "vtp" format is a format used by VTK which is the component used by OpenSim for visualization.
Q. OpenSim loads many models in the same graphics window, how do I know which one I'm working on now?
A. Although many models are loaded, only a single model can be marked as "Current". This is indicated by the dropdown in the application toolbar and also in the navigator.
Q. I can't pick some objects in the Graphics window, is this a bug?
A. Picking is restricted to "Current model" (by default non-current models are dimmed out). If you want to pick on a non-current model you'll have to make it current first.
Q. I can't pick some Muscle Points in the Graphics window why?
A. Moving Muscle Points are special Muscle Points that have Splines describing their trajectories so they can't be picked and dragged from the GUI.
Q. Would it be possible to open a C-3D file directly in OpenSim?
A. This is a popular feature request, and we are working on getting it implemented for a future release of OpenSim.
Q. What muscle models are included in OpenSim and what do you have to develop yourself? Are there some generic muscle models available get one started?
A. There are 3 muscle models implemented in OpenSim:
(1) Delp1990Muscle, based on the model described in Delp et al., 1990. Delp SL et al., An interactive graphics-based model of the lower extremity to study orthopaedic surgical procedures. IEEE Trans Biomed Eng. 1990; 37(8):757-67.
(2) Schutte1993Muscle, based on the model described in Schutte et al, 1993. Schutte, L.M., Rodgers, M.M., Zajac, F.E., Glaser, R.M., 1993. Improving the efficacy of electrical stimulation-induced leg cycle ergometry: an analysis based on a dynamic musculoskeletal model. IEEE Transaction on Rehabilitation Engineering 1,109–125.
(3) Thelen2003Muscle, based on the model described in Thelen, 2003. Thelen DG. Adjustment of muscle mechanics model parameters to simulate dynamic contractions in older adults. J Biomech Eng. 2003; 125(1):70-7.
Also, check out Section 4.4 of the OpenSim Developer's Guide to learn how you can use the OpenSim API to create a custom muscle model.
Using OpenSim Tools
Q. How can I import data into OpenSim Plotter?
A. Under Y-Quantity, select "Load file..." and then you can read data files on the format of SIMM motion data.
Q. How about exporting the data for the plots into a ASCII file for processing by Matlab or use in Excel?
A. Under the "curves list", right click on the top level node and select "Export Data...". OpenSim will prompt you for a file name to save the data into. This file can be later re-imported into OpenSim or used by other applications.
Q. What anthropometric database is used for the model scaling?
A. OpenSim does not use a database for scaling. The model is scaled based on measurements of experimental markers. Check out Chapter 14 of the OpenSim User's Guide for more details on scaling.
Q. Have you considered the delay within activation dynamics in your model? If yes, how?
A. Yes, the muscle models in OpenSim model the electro-mechanical delay between muscle excitation (or the electrical neural signal sent to the motor-neuron junction) and activation (i.e., the level of force production). From more details on the theory behind our muscle models, check out this great review paper by Felix Zajac: Zajac FE. Muscle and tendon: properties, models, scaling, and application to biomechanics and motor control. Crit Rev Biomed Eng. 1989, 17(4):359-411.
Q. What are typical settings that are modified during the RRA?
A. RRA is an optimization algorithm whose goal is to minimize the non-physical “residual” forces acting on a dynamic simulation. The settings modified for RRA are the inputs to the optimization algorithm, which include the excitation limits (i.e., min/max controls) for the residual actuators along with the tracking weights for each of the coordinates (i.e., joint angles).
Q. Is there anyway that you can incorporate stretch activation of muscle to try and get the model to predict the activation of muscle before foot strike?
A. Sure! You could develop a custom controller in the OpenSim API that is based upon the stretch of muscle or tendons in the model and map that back to predicted activations. This is definitely something you could do with OpenSim.
Q. Is the orientation (i.e., pennation angle) or constitution of fibers (e.g., slow vs. fast) taken into account in the muscle models?
A. Yes, we do model the orientation, or pennation angle, of muscle fibers, but no, we do not model slow versus fast twitch fibers. For more details on the theory behind these muscle models, check out this great review paper by Felix Zajac: Zajac FE. Muscle and tendon: properties, models, scaling, and application to biomechanics and motor control. Crit Rev Biomed Eng. 1989;17(4):359-411.
Q. Has anyone used Opensim to simulate pathological gait, like stroke patients or OA patients? What is the difficulty of simulating pathological gait?
A. Yes, students and researchers in the Neuromuscular Biomechanics Lab at Stanford have created muscle-actuated simulations of individuals with cerebral palsy with a crouch gait. Check out a recent study led by Kat Steele. Steele, K.M., Seth, A., Hicks, J.L., Schwartz, M.S., Delp, S.L. Muscle contributions to support and progression during single-limb stance in crouch gait. Journal of Biomechanics, vol 43, pp 2099-2105.
Q. Why would you need to scale the model's muscle strength at all? Does this reflect the model's development from cadaver data?
A. Yes, the optimal force or max strength of the muscles in the model used for this study were based on Delp, 1990 (see reference below), which determined muscle parameters from cadavers. While the strength of the model was not increased to study running (Hamner et al., 2010) , other researchers have noticed that the "strength" (i.e., optimal force) of the muscles has to be increased for movements with higher forces and accelerations, like running and cutting, or for pathological gaits, such as crouch gait. Delp SL et al., An interactive graphics-based model of the lower extremity to study orthopaedic surgical procedures. IEEE Trans Biomed Eng. 1990; 37(8):757-67.
Q. Can you briefly describe available ways to compute muscle forces in OpenSim besides CMC?
A. Yes, OpenSim has another tool called Static Optimization, which has been used by numerous researchers to estimate muscle forces. Check out this paper describing static optimization: Anderson FC, Pandy MG. Static and dynamic optimization solutions for gait are practically equivalent. J Biomech. 2001,34 (2):153-61.
Q. Do you take synergistic muscles into account?
A. No, we do not explicitly model synergistic muscle groups. Computed muscle control treats each muscle as an independently controlled actuator. However, our results show that muscles are still activated in the observed synergistic groups.
Q. What anthropometric database is used for the model scaling?
A. OpenSim does not use a database for scaling. The model is scaled based on measurements of experimental markers. Check out How Scaling Works for more details on scaling.
Q. When you are scaling the generic model to match the subject, how do you account for the difference in bone length, like, if someone has a proportionally shorter tibia?
A. Scaling in OpenSim scales each body segment independently based on measurements of markers placed on that segment. Check out Chapter 14 of the OpenSim User's Guide for more details on scaling.
Q. Getting back to the muscle force question, are the muscle forces not scaled based on the subject's weight (compared to the generic model weight)?
A. No, the scale tool in OpenSim does not automatically scale muscle forces based on the geometricbased scaling (i.e., scaling based on distance measurments between markers) or the mass scaling. However, you can scale muscle forces in the model based manually if you have a criterion for doing this.
Q. What is the relationship between muscle forces and EMG data that we have collected?
A. Muscle models in OpenSim generate force based on three parameters: activation, muscle fiber length, and muscle fiber velocity. The muscles have "control" inputs we call excitations, and the models represent the electro-mechanical delay from these excitations to activation with a first order differential equation. From more details on the theory behind these muscle models, check out this great review paper by Felix Zajac: Zajac FE. Muscle and tendon: properties, models, scaling, and application to biomechanics and motor control. Crit Rev Biomed Eng. 1989;17(4):359-411.
Q. How do you incorporate BIODEX data into your simulations?
A. BIODEX data can be used to determine the strength, or torque generating capacity of your subject. Researchers have used this information to modify the optimal muscle forces used in their model. For an example, check out the paper by Anderson & Pandy from 2001. They explain, "Values of peak isometric muscle force and tendon slack length were adjusted so that the maximum isometric torqueangle curves for each joint in the model matched average torque-angle curves measured for the five subjects." Anderson FC, Pandy MG. Dynamic optimization of human walking. J Biomech Eng. 2001;123(5):381-90.
Q. Can one extract the muscle force magnitudes, points of origin and direction of action? What is the reference frame used?
A. While this is not currently a pre-packaged analysis in OpenSim, it is definitely possible to extract this information with a plug-in or a custom API main program. I believe there are other researchers working on something similar to export muscle force information into a finite element analysis.
Q. I am new to these kinds of simulations and would like to make a new model of a simple experimental set up (in this case an inverted pendulum). What software could I use to generate this for dynamic analysis?
A. For dynamic simulations of rigid body systems, like a double pendulum, check out Simbody(TM), which is the rigid-body dynamics engine used by OpenSim. It is open-source and freely available with a well-tested and stable API. The project page is https://simtk.org/home/simbody.
OpenSim Scripting support
Q. Does OpenSim 3.0 support python scripting? (or only MATLAB?)
A. Yes, OpenSim supports scripting in Jython (an implementation of Python in Java). That's exactly the type of shell you see in the OpenSim application, it utilizes a technique (called wrapping) to invoke the OpenSim C++ API from Java. Same technique is used to invoke the OpenSim API from MATLAB.
Q. Is there full documentation on how the API is exposed to Scripting?
A. You should be able to leverage the extensive Doxygen documentation of the OpenSim API to use it in Scripts. You'll also find the examples included with the distribution as well as the help page on Scripting (Common Scripting Commands) helpful.
Q. Is the MATLAB interface only for 32 bit MATLAB or will it work for 64 bit as well?
A. The MATLAB interfaces invokes the API libraries, and so it can run on any platform that the libraries can be built on. As of 10/2012 the supported platforms are Win32, and 32/64 on MacOS, Linux.
Q. Should OpenSim be running when doing scripting from another language like MATLAB/python?
A. No, the OpenSim application and the scripting interface both utilize the same libraries but are unrelated otherwise. While scripting in the GUI you have access to all the API and some GUI functionality (e.g. control of view, plotter, loading models, motions, etc.). While in MATLAB you have access to the API and you can use the MATLAB tools for plotting and the API Visualizer. You can also use the scripting interface from a standalone Jython shell but you have access to neither the GUI functionality nor MATLAB's.
Q. Can OpenSim scripting control all of its functions?
A. You practically can invoke any menu command and many other functions (e.g. Plotting) from the scripting layer but not all dialogs/tools/options are exposed. Please consult the page Common Scripting Commands#GUIScriptingShell for specific examples.
Q. Do you provide a debug mode when scripting?
A. You can turn on more verbose messages so you get more feedback while running scripts by calling modeling.setDebugLevel(3) but for syntax errors you usually get the error message from the scripting shell directly.
OpenSim vs SIMM
Q. What is the relationship between SIMM and OpenSim
A. Please review this PDF (updated March 2010)