12 Importing OpenSim Models

12.1 Overview

ArtiSynth provides an OpenSimParser class that can be used to import parts of an OpenSim model ([7]; versions 3 or 4), translating the components into their ArtiSynth equivalents and arranging them inside a MechModel. The OpenSim component hierarchy is preserved, and the resulting MechModel components can be queried using methods supplied by the parser. Not all OpenSim components are implemented, but those that are include most of the commonly used components found in "bodyset", "jointset", "forceset", "constraintset", and "markerset". Implemented muscles include Thelen2003Muscle and Millard2012EquilibriumMuscle.

By using this parser, applications may leverage the large existing corpus of OpenSim models as a starting point for ArtiSynth models. As usual, model creation is done inside the model’s build() method, and typically entails the following steps:

  1. 1.

    Use OpenSimParser to import the OpenSim model into a corresponding MechModel.

  2. 2.

    Understand the component hierarchy that realizes the model.

  3. 3.

    Adjust the visualization and if tune parameters if needed so the model is stable under forward simulation.

  4. 4.

    Edit the model by removing unneeded components and/or adding structures, such as FEM models, not present in the original.

These steps will now be discussed in more detail.