Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The frequently asked questions about OpenSim are broken up into several categories:

...

A. The name OpenSim refers to two distinct entities, the OpenSim libraries (API), which are a C++ library of classes used for modeling and simulation of biological structures, and the OpenSim application (GUI) which builds on the OpenSim API. The only distribution of the GUI is on Windows (32Bit and 64Bit as of 3.1). Mac users who want to use the GUI, have successfully run OpenSim using Bootcamp, Virtual Machines, or other environments that simulate Windows on a Mac. Please see Running OpenSim on Mac OS X or Linux using a Windows Virtual Machine for more information.

The API (headers, libraries and Doxygen documentation) is available for Windows (32Bit and 64Bit as of 3.1), Mac (32Bit and 64Bit), & Linux (32Bit and 64Bit) and is available on the OpenSim 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.  

...

Visualization and Graphics

Q. Why can't I launch the GUI's visualizer in Windows?


A: The OpenSim 3.3 GUI has been unable to launch the 3D visualizer for some 
Windows users. If you are experiencing this problem, it is likely that a few core Microsoft libraries are missing from your Windows 10 installation. To fix this, you must install these missing libraries using the correct Microsoft VC Redistributable Installer. Download the Visual C++ 2010 Redistributable installer for 64-bit or 32-bit machines, close OpenSim GUI if it's open, run the installer, and reopen the OpenSim GUI.
Update: The latest OpenSim Installer (OpenSim-3.3.0-win64VC13P.exe) has been updated to include the Visual C++ Redistributable installer. 

Q. I imported a model from SIMM but the bones don't show up what's wrong? 

...

A. Open Edit/Preferences and edit the entry for "Geometry Path" which is a semicolon separated list of directories and add the desired path. See User Preferences for more information.

Q. What are .vtp files? 

...

A. Yes! If you have a motion or simulation you can use the Analysis tool to run a Kinematics or PointKinematics analysis. See the Analyses chapter for more information.

...

A. OpenSim does not use a database for scaling. The model is scaled based on measurements of experimental markers. See How Scaling Works for more information.

Q. When you are scaling a generic model to match a particular 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. See the section on Scaling for more details.

Q. Why have some studies with OpenSim scaled the model's muscle strength? Does this reflect the model's development from cadaver data?

...

A. No, the scale tool in OpenSim does not automatically scale muscle forces based on the geometric based scaling (i.e., scaling based on distance measurements 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. See the Scripting chapter for info about how to do this with a script.

...

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). See Getting Started with RRA for more information.

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. How can I find a good model for my research study?

See our Musculoskeletal Models page for a list of OpenSim models that we've developed at Stanford, as well as a link to the library of models from our team and other researchers on Simtk.org. Please also see our page on Evaluating a Musculoskeletal Model. It has a list of questions to review when deciding what model to use in your research.

...

A. Importing data can sometimes be time consuming and require troubleshooting. The most difficult part is setting up a custom workflow that fits our lab and needs. See Preparing Your Data for more information about this process. We've added Scripting to make it easier to customize your workflows. Other users have also contributed their tools in the OpenSim Utilities library. We also plan to continue to improve our usability going forward, as one of our top priorities.

...

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?

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 Python or Jython shell but you have access to neither the GUI functionality nor MATLAB's. See Common Scripting Commands for more information.

Q. Can OpenSim scripting control all of the GUI's functiontionality?

A. You can invoke almost any menu command and many other functions (e.g. Plotting) from the GUI 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?

...

Q. How should I do batch processing for the OpenSim tools (e.g. IK, ID, CMC) with a script?

In general, we strongly discourage doing raw parsing of XML files in a Matlab script. This approach is not robust and does not take advantage of the OpenSim API in Matlab. Instead you should instantiate tools/objects from setup files and let the code do the parsing internally. The XML format changes with different versions of the software and the version number of the documents written by newer versions of the software may even be different from the one you read due to backward compatibility built into the code and assumptions about default values, etc. You'll keep changing your code endlessly rather than rely on a robust API that makes calls to set/get values (rather than parse XML files). In essence the assumptions about the contents of the XML files and the XML file header are all built into the code that is exercised by the API but ignored by any XML parsing code. Violating these assumptions will break the functionality downstream.

An example using parsing (not recommended for OpenSim 3.0):

Code Block
% get initial and inal time from first and last entry in time column
initial_time = trcData(1,1);
final_time=trcData(end,1);
    
xmlDoc.getElementsByTagName('IKTool').item(0).getAttributes.item(0).setValue(name);
xmlDoc.getElementsByTagName('marker_file').item(0).getFirstChild.setNodeValue([trialsForIKPath markerFile{1}]);
xmlDoc.getElementsByTagName('output_motion_file').item(0).getFirstChild.setNodeValue([results_folder '\' name '_ik.mot']);
xmlDoc.getElementsByTagName('time_range').item(0).getFirstChild.setNodeValue([num2str(initial_time) ' ' num2str(final_time)]);

An example of calling the API (recommended):

Code Block
% Get trc data to determine time range
markerData = MarkerData(markerDateFileName);
    
% Get initial and intial time 
initial_time = markerData.getStartFrameTime();
final_time = markerData.getLastFrameTime();
    
% Setup the ikTool for this trial
ikTool.setName(name);
ikTool.setMarkerDataFileName(fullpath);
ikTool.setStartTime(initial_time);
ikTool.setEndTime(final_time);

...