WELCOME TO THE NEW PLATFORM FOR THE OPENSIM DOCUMENTATION

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


What's New in OpenSim 4.2?


OpenSim 4.2 is now available. You can download the release here


We are pleased to announce the following new features, bug fixes, and other improvements in OpenSim 4.2. We also provide a list of key details for upgrading to OpenSim 4.2 from previous versions of OpenSim (see section Upgrade Notes), as well as pointers to additional information on the changes in OpenSim 4.2.


New Features for Working with Inertial Measurement Unit (IMU) Data:

  • Tools in the OpenSim application (GUI) for calibrating a model based on IMU data and solving the inverse kinematics problem (e.g., to compute joint angles) from IMU data. We have documented the tools for working with IMU data in our User's Guide (see IMU Placer and IMU Inverse Kinematics), as well as through an example (OpenSense - Kinematics with IMU Data).
  • New option to visualize sensor data (quaternions) in the application (go to File → Load Sensor Data).
  • Associate motion data now handles orientation sensors, so that orientation triads follow animated motions.
  • New options in the opensim-cmd command line utility to visualize models, simulations, or raw data (both Markers and IMU-orientations). See opensim-cmd viz -help for more details.


New Options for Creating Movies:

  • When creating videos, if the user wishes to record from the beginning of a loaded motion, they can hit record then hit play in the motion player. The video will start at the first frame of the loaded motion. 
  • Users can save stills of animation playback to construct videos using packages like ffmpeg (e.g., for cases where users are not able to achieve a consistent frame rate when using the standard record video option). You can access this option from the GUI's scripting shell. We support gif, jpg, png; use setVisualizerOption("video_format", "png")).


Integration and Cross-Compatibility with Moco plus Moco Updates:

  • Moco has now been merged into the core OpenSim codebase. This integration will enable faster development updates and keep Moco synchronized with OpenSim releases.
  • Various updates to Moco are also included in the OpenSim 4.2 release:
    • A bug that caused a muscle's PathWrapSet to not be included when converting to DeGrooteFregly2016Muscle has been fixed
    • Issues with using muscle wrapping when solving problems in parallel have been fixed
    • Joints whose generalized speeds do not match the derivative of the generalized coordinates (i.e., BallJoint, FreeJoint, EllipsoidJoint, and ScapulothoracicJoint) are not supported by Moco, and an Exception is now thrown to explicitly disallow these joints
    • Added exampleKinematicConstraints.py and exampleHangingMuscle.py
    • Various smaller updates, see the Moco changelog for more details
    • Added Bhargava2004SmoothedMuscleMetabolics, a smoothed version of the Bhargava metabolics model designed for gradient-based optimization (i.e., Moco).


New Features and Examples for Matlab Users:

  • Utilities to easily convert Matlab matrices and Python NumPy arrays to and from OpenSim Vectors and Matrices. See Matlab example matrixConversions.m and Python example numpy_conversions.py.
  • The new Matlab CustomStaticOptimization.m guides the user to build their own custom static optimization code.
  • The new Matlab examplePointMass.m shows how to build and simulate a point-mass model.


Integration  of Scapulothoracic Joint:

  • Classes to support the Scapulothoracic Joint Plugin have been included in OpenSim libraries so the shoulder model by Seth and colleagues can be used without loading any plugins. The inverse dynamics tool has been upgraded to support this model/joint-type.


Improvements and Additions to the API for Matlab, Python, and C++ Users:

  • Integrated ezc3d (https://github.com/pyomeca/ezc3d) for reading C3D files by default, replacing BTK.
  • A new ActivationCoordinateActuator component, which is a CoordinateActuator with simple activation dynamics
  • New utilities for querying, filtering, and resampling TimeSeriesTables 
  • StatesTrajectories can now be created from a TimeSeriesTable of states 
  • Read about each of these new items in Doxygen


Bug Fixes and Performance Enhancements:

  • Fixed OpenSense calibration algorithm to handle models facing an arbitrary direction. The calibration algorithm now aligns one axis of the provided Orientation Sensor data with the x-axis of the base segment (e.g. pelvis) of the model in default pose.
  • Fixed a bug where scaling a model with custom geometry meshes resulted in a loss of visualization of the scaled meshes.
  • Performance improvements (5-10 %) for controller-heavy models by making improvements to the performance of ComponentPath
  • Fixed bug in visualization of EllipsoidJoint that was not attaching to the correct frame
  • Fixed bug in error reporting of sensor tracking
  • Fixed a bug in Induced Accelerations Analysis which prevented the analysis from running when external forces were present.


Updates and Improvements to Logging of Errors and Other Messages:

  • Introduced new logging system based on spdlog https://github.com/gabime/spdlog.git. The transition should be transparent to end users with default settings except that the name of the log file is now opensim.log. Main new features are:
    • The ability to customize error level for reporting (in increasing level of verbosity): Off, Critical, Error, Warn, Info, Debug, Trace
    • The ability to start logging to a specified file on the fly.
    • Log file messages are time stamped and the format can be changed by users
    • More details and additional functionality is described in the Developer's Guide, and Doxygen pages of OpenSim::Logger class.
    • Users have more control over which messages are logged. Messages are now logged to opensim.log instead of out.log and err.log. Users can control logging levels via Logger::setLevel().
    • Added a CMake option, OPENSIM_DISABLE_LOG_FILE, when set, it disables opensim.log from being created by the logger by default when the first message is written. This flag is OFF by default.
  • Consult the page for Common Scripting Commands for commands and example code snippets.


Upgrade Notes:

  • Dropped support for separate Kinematics for application of External Loads. Removed reference to kinematics for external loads from External Loads creation/editing dialog. Typically these were left blank in examples/tutorials. If, however, old kinematics were specified and they were different from the kinematics being analyzed, then results could change. A warning will be issued if you use a file with kinematics for external loads specific. This has been marked as deprecated since version 4.0.
  • Fixed a bug in Millard2012EquilibriumMuscle::extendFinalizeFromProperties(): the end point slopes on the inverse force velocity curves are now constrained to yield a valid curve. A warning is noted in the log if the slopes are small enough that numerical integration might be slow.
  • Added logging to Millard2012EquilibriumMuscle::extendFinalizeFromProperties(): whenever an internal setting is changed automatically these changes are noted in the log (e.g., if the muscle has non-zero damping, the active force length curve minimum value will be changed to zero if it is not already zero). To avoid seeing these messages, update the corresponding properties in the .osim file to the values noted in the log message.


Full list of changes and updates:

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.