More and more OpenSim users are using the MATLAB scripting interface for research. In this workshop, the OpenSim team will use a hands-on example to introduce the new features of OpenSim 4.0 that make scripting in MATLAB more powerful and user-friendly. The new OpenSim API (Application Programming Interface) in version 4.0 has been improved to simplify building model components, running simulations, performing analyses, and working with data files.    

A hands-on example will teach participants how to build models and run simulations through the MATLAB scripting interface, by working with a simple computational model of a person jumping. The workshop will feature a friendly competition between participants to optimize the jumper's performance in a simulation.

The workshop will last three-hours and is designed for those who are familiar with both OpenSim and MATLAB. Participants who have not used OpenSim, but have a strong background with computational modeling and simulation of the musculoskeletal system, are also welcome to participate.


Preparing for the workshop

Files temporarily not available

Now that the workshop has concluded, the files for the workshop are no longer available here. However, the OpenSim 4.0 release will contain the example files used in the workshop. Advanced users can find these files in the opensim-core GitHub repository.

We will conduct the workshop using a beta version of OpenSim 4.0 API (the GUI is not included). To ensure the workshop starts smoothly, please set up and test this beta version before departing for the symposium. 
  1. Download the files here (links no longer work)
    1. Windows, 64-bit MATLAB
    2. Windows, 32-bit MATLAB
    3. Mac
    4. The example requires MATLAB 2014b. If you have an older version, you can team up with others or download a free trial of MATLAB.
  2. Unzip the files to a location of your choice; perhaps C:\opensim-core-tgcs (on Windows).
  3. If you use Windows, edit your PATH environment variable to include the bin directory (e.g., C:\opensim-core-tgcs\bin). See here for instructions. Make sure to remove any previous OpenSim installations from your PATH (alternatively, rename the folder containing the previous OpenSim installation).
  4. Configure OpenSim with MATLAB by starting MATLAB and running configureOpenSim.m. This file is located in:
    1. Windows: sdk/Scripts/Matlab
    2. Mac: share/doc/OpenSim/Scripts/Matlab
  5. After the script completes, restart MATLAB and test the configuration by checking the timestamp from running org.opensim.modeling.opensimCommon.GetVersionAndDate() in the MATLAB command window; the date should be in July 2017. 
    1. Test that the visualizer is working by running the following, after which you should see an empty visualizer window.

Post-workshop report

Thank you to all those who participated in the workshop!

Many people participated in the competition to maximize jump height. The winners were as follows:

Jump heightName(s)Video of jump (view in Chrome or Firefox)
1st place, 1.7088mNiamh Gill and Amy Lewis
2nd place, 1.6454 mMichael Skipper Andersen
3rd place, 1.6438 mJeroen van der Eb and Andi Liu