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.
- Download the files here (links no longer work)
- Windows, 64-bit MATLAB
- Windows, 32-bit MATLAB
- Mac
- The example requires MATLAB 2014b. If you have an older version, you can team up with others or download a free trial of MATLAB.
- Unzip the files to a location of your choice; perhaps C:\opensim-core-tgcs (on Windows).
- 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).
- Configure OpenSim with MATLAB by starting MATLAB and running configureOpenSim.m. This file is located in:
- Windows: sdk/Scripts/Matlab
- Mac: share/doc/OpenSim/Scripts/Matlab
- 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.
Test that the visualizer is working by running the following, after which you should see an empty visualizer window.
>> m = org.opensim.modeling.Model() >> m.setUseVisualizer(true); >> m.initSystem();
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 height | Name(s) | Video of jump |
---|---|---|
1st place, 1.7088m | Niamh Gill and Amy Lewis | |
2nd place, 1.6454 m | Michael Skipper Andersen | |
3rd place, 1.6438 m | Jeroen van der Eb and Andi Liu |