The Ease and Grace of OpenSim 3.0

New release improves both GUI and API

OpenSim 3.0 makes it easier for users to add new model components, such as the muscle reflex controller used in this simulation of a drop landing with an ankle brace. The controller activates muscles based on how fast they are lengthening. The 3.0 GUI also lets users quickly edit parts of a model such as the weight of the backpack, the strength of the model's muscles, or the stiffness of the ankle brace. Courtesy of Ajay Seth, Matt DeMers, and John Rogers.OpenSim, the neuromuscular modeling and simulation software, is now available in a new digit: 3.0. The change (up from 2.4) reflects significant improvements that make this open source tool more intuitive and efficient for typical users as well as advanced developers, says Jen Hicks, PhD, OpenSim’s research and development manager.

 

“We want it to do easy things easily and hard things gracefully,” says Matt DeMers, a graduate student of mechanical engineering at Stanford University who is both a developer and user of OpenSim. With this version, that hope has become a reality, he says.

 

In OpenSim, users develop models of musculoskeletal structures and create dynamic simulations of movement using either a graphical user interface (GUI) or, for more advanced developers, an application programming interface (API). Version 3.0 includes numerous improvements to both the GUI and the API as well as performance improvements. “The OpenSim development team is always looking for better, faster, more accurate ways to calculate things,” DeMers says.

 

GUI Usability

The biggest advance in OpenSim 3.0 is the ability to edit and iterate models quickly and intuitively in the GUI. “When someone is creating a model and simulation, there’s a lot of tweaking that happens,” Hicks says. Often, modelers are adjusting a model to better match a particular person’s geometry—the length of bones and muscles, the size of the torso, the angle of the joints. In earlier versions of OpenSim, making such changes was somewhat cumbersome: Users had to close the model in OpenSim, edit and save a new text file of the model, then navigate to that file in OpenSim and re-open it. But now, right in the GUI, when users click on a muscle, bone, body or joint, they can see its properties (where it’s located, what it looks like, how strong it is), change a number, hit “enter,” and immediately see the updated model, providing instant feedback on whether the change is a good one. “And you can do that over and over to iterate very quickly,” DeMers says. “That’s the big gain with OpenSim 3.0.”

 

It helps that the GUI now also provides improved visualization tools as well. “You can look at forces, positions and vectors in a file all day long and not know what it really means,” DeMers says. “But when you can see it in the GUI, you can tell whether it looks reasonable or resembles something physical as you’d expect it to appear.”

 

It’s also now possible to fine tune functions—the math behind how a joint or muscle moves—right in the GUI. ”Our bodies have messy geometry; they translate and rotate at the same time; they move in strange ways,” DeMers says. It’s handy to be able to adjust a function to fit a particular scenario, right in the GUI.

 

The GUI also features a number of other usability improvements, Hicks says, such as the ability to drag and drop models and motions; access a help button relevant to the tool you’re currently using; and show a list of recently opened files. “These small usability improvements are big productivity boosters,” she says.

 

The importance of these GUI changes shouldn’t be underestimated, DeMers says. “At the end of the day, you’ll send your model through a fancy numerical pipeline, but the stuff that takes a lot of time is the nitty-gritty stuff—changes and modifications and checking that you’ve configured everything correctly. Those front-end tasks all happen in the GUI, and in 3.0 it’s a much nicer experience.”

 

MATLAB and GUI Scripting

OpenSim provides ample core functionality and out-of-the-box tools for creating models of bodies, joints, and muscles. “And that’s what most people use,” Hicks says. But researchers might want to do something a little bit different that they can’t do with the core tools, such as make a new type of muscle. Or they might want to do the same set of operations over and over again (batch operations). Until now, such things could only be done with tedious parsing of text files or using C++ programming in the OpenSim API. But C++ has a steep and often frustrating learning curve, Hicks says.

 

To address that limitation, OpenSim 3.0 now offers two other options: writing scripts with a Python interface in the GUI or writing scripts that call the OpenSim tools and edit models from MATLAB. Because most engineering students are familiar with using MATLAB or Python, this will be a welcome change for many OpenSim users.

 

A Sleeker API

For advanced developers and researchers who want to work in C++, OpenSim 3.0 also offers a cleaner, more intuitive API where they can add new features that know how to talk to OpenSim. “By providing a library of muscles, joints, and other components,” DeMers says, “OpenSim’s API gives other researchers a jumping off point to create new and interesting components.”

 

But the challenge in creating an API is to make the interface clean and intuitive to use. That’s where OpenSim 3.0 has made a big leap. “Every iteration of OpenSim has tried to refine that interface and now it’s finally crossing a threshold where you don’t have to be an expert in OpenSim to program anything,” DeMers says. “So if someone wants to make a fatiguing muscle,” Hicks says, “the developer has to think about the science of it and not so much the bookkeeping side of things.”

 

Revamped Muscle Models

As part of the 3.0 upgrades, OpenSim’s muscle models were revamped to improve accuracy and performance. Muscles are the primary driving force in a simulation of walking, running, or any other movement. “Having models of muscle that are robust and also easy to fine tune and extend for new uses is a huge improvement not only for developers, but also every OpenSim user,” Hicks says.

 

A New License

Earlier versions of the OpenSim GUI were freely available to any researcher or nonprofit user; and the source code was accessible to any user who asked for it. Now, the GUI and API are also available to commercial users and the API has a certified open-source license. “Now people can get it without having to ask,” Hicks says. “This further consolidates OpenSim as a common biomechanics platform for all.” 

 

 

DETAILS

OpenSim 3.0 is available for download at https://simtk.org/home/opensim). It is funded by Simbios; the National Center for Simulation in Rehabilitation Research; and the DARPA Warrior Web Program.

 

The lead OpenSim application architect is Ayman Habib, PhD. The lead API architect is Ajay Seth, PhD. See the full OpenSim team at http://opensim.stanford.edu/about/people.html.

 



All submitted comments are reviewed, so it may be a few days before your comment appears on the site.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.