Remember to update your bookmarks with our new URL.
If you find missing content or broken links, let us know: opensim@stanford.edu

ISB Technical Group on Computer Simulation (TGCS) 2019 Moco Workshop

This workshop is the first public preview of OpenSim Moco, an upcoming software package for solving common problems in simulation biomechanics including tracking simulations, predictive simulations, muscle-redundancy problems, and more. Moco brings state-of-the-art direct collocation optimal control methods to the wider biomechanics community without requiring numerical expertise to solve complex problems. Moco leverages OpenSim’s existing modeling capabilities to allow you to seamlessly make the transition from model building to simulation a seamless process in your research.

The objectives of the workshop are to introduce participants to Moco’s features, optimize a simple movement from scratch, and to collaboratively solve a biomechanics problem with other participants.

The tutorial assumes familiarity with Matlab, but experience with OpenSim or direct collocation methods is not required.

Preparing for the workshop

We will conduct the workshop using a beta version of OpenSim Moco (the OpenSim GUI is not included). To ensure the workshop starts smoothly, please set up and test this beta version before the workshop. We will allocate only 5 minutes during the workshop for set up; if you do not have OpenSim Moco set up after this time, we'll ask you to pair up with someone.

Software requirements

  • Windows 10 (64-bit) or Mac (macOS 10.11 or later)
  • Matlab 2016b or later (64-bit). Matlab 2018a or later is best.


  1. Download the OpenSim Moco beta software and workshop files:
    1. No longer available – sign up for the OpenSim mailing list to be notified when Moco is available again.
  2. Unzip the files to a location of your choice; perhaps C:\opensim-moco (on Windows).
  3. If you use Windows, edit your PATH environment variable to include OpenSim Moco’s bin directory (e.g., C:\opensim-moco\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 configureMoco.m, located in Resources/Code/Matlab/. Do NOT use configureOpenSim.m, which is in the same folder.

  5. After the script completes, restart Matlab and test the configuration by checking the timestamp from running 


     in the Matlab command window; the date should be in July 2019. Test that the visualizer is working by running the following:

    >> cd C:/opensim-moco/Resources/Code/Matlab
    >> exampleSlidingMass

    You should see an empty visualizer window. On WIndows, close the window by clicking the X toolbar button. On Mac, use the keyboard shortcut Command-Q.

Note for OpenSim 3.3 users: You cannot concurrently use OpenSim 3.3 and 4.0 in Matlab; to switch versions you must re-run configureOpenSim.m and edit your PATH environment variable.

Slides and cheat sheet

Workshop survey

Please fill out our post-workshop survey.  Thank you!

OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.