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.5?

OpenSim 4.5 is available for download from the OpenSim Simtk project page. https://simtk.org/frs/?group_id=91

We are pleased to announce the following new features, bug fixes, and other improvements in OpenSim 4.5. The new software includes improvements to the look and feel of the GUI, updated Conda packages to make it easier to use the OpenSim API through latest Python versions up to 3.11 and updated Docker containers, additional Moco functionality, and the introduction of FunctionBasedPath for function-based muscle wrapping leading to speed-ups in muscle-driven simulations using it. We also now distribute a version of the Rajagopal model with the OpenSim resources folder included in the OpenSim application. Release notes are provided below along with links to full change logs for more detail.

FunctionBasedPath for modeling muscle geometry:

  • The new FunctionBasedPath is an alternative to GeometryPath that allows modeling muscle lengths and moment arms using multivariate polynomial functions. For models with many and/or complex wrapping surfaces, this could lead to improvements in computation time. 
  • We also added PolynomialPathFitter, a utility class for converting the set of geometry-based paths (GeometryPaths) in an OpenSim model to a set of FunctionBasedPaths.
  • We also provide a scripting example, examplePolynomialPathFitter, for Matlab and Python users which demonstrates how to use PolynomialPathFitter given a musculoskeletal model and reference motion. 

API Change

Support for FunctionBasedPath necessitated the removal of the unnamed property 'GeometryPath' in PathActuator (and all derived classes including Muscle), PathSpring , Ligament , and Blankevoort1991Ligament . Therefore, the property methods get_GeometryPath() , upd_GeometryPath() , etc., are no longer available and should be updated to the backwards-compatible methods getGeometryPath() and updGeometryPath()

Moco Functionality:

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using direct collocation. In this release we made the following improvements:

  • We updated the models in exampleMocoTrack and exampleMocoInverse to use FunctionBasedPaths, and made minor changes to improve the quality of the muscle activity solutions in these examples.
  • All MocoGoals now have the methods setDivideByDisplacement(), setDivideByMass(), and setDivideByDuration(). These methods can be used to normalize the cost or endpoint constraint value in any MocoGoal by the model's total center-of-mass displacement, the model's total mass, and the total duration of the MocoProblem.
  • (Experimental) We added new transcription schemes to MocoCasADiSolver based on state-of-the-art pseudospectral collocation methods. These schemes solve the dynamics of a model with high accuracy for relatively few collocation points, which help improve convergence. These can be selected by passing "legendre-gauss-#" or "legendre-gauss-radau-#" to set_transcription_scheme(), where "#" is the number of collocation points in each mesh interval between 1 and 9.
    • Note that these schemes currently cannot be used with models with kinematic constraints. Support for kinematic constraints with pseudospectral collocation will come in the next API release.
  • The utility function createExternalLoadsTableForGait() now outputs center of pressure locations for foot-ground contact force elements.
  • Reference ground reaction forces can now be normalized when using MocoContactTrackingGoal, which may be useful for scaling tracking cost terms to similar magnitudes as other (e.g., control effort) costs.
  • Foot-ground contact forces can now be optimized (e.g., maximize contact impulse) via MocoOutputGoal using the new Outputs 'sphere_force' and 'half_space_force' added to SmoothSphereHalfSpaceForce.

Performance Improvements & Feature Requests:

  • Added the method getAnalogDataTable() to C3DFileAdapter to read and return analog data tables (e.g., EMG signals) from C3D files.
  • Added methods to an OpenSim Model for obtaining gravity, mobility, and body forces from the underlying simbody system.
  • Fixed XML-related memory leaks that occured when deserializing models and copying a CMC_TaskSet. These leaks were causing memory usage to grow upon repeated loading/discarding of models occasionally leading to running out of memory.
  • Added methods calcAngularMomentum() and calcLinearMomentum() and Outputs to Model for computing whole-body linear and angular momentum. These Outputs can be calculated post-hoc from simulation results using an OutputReport, or optimized in a Moco problem using MocoOutputGoal.
  • Added ModOpReplaceMusclesWithPathActuators to the list of available ModelOperators compatible with ModelProcessor. This ModelOperator will replace any Muscles in the model with PathActuators using the GeometryPaths from the Muscles.

Model Library:

  • Added the model RajagopalLaiUhlrich2023.osim, a modified version of Rajagopal2016.osim containing improvements to muscle properties and path geometry based on Lai et al. (2017) and Uhlrich et al. (2022).
  • Renamed Rajagopal2015.osim to Rajagopal2016.osim to reflect the actual publication year of the manuscript associated with the model Rajagopal et al. (2016). We also updated the fiber damping in the muscles based on the recommendations of Millard et al. (2013) to reduce numerical stiffness and improve performance. The model is distributed for backward compatibility.

Bug Fixes:


  • Fixed a bug where failing problems in Moco returned a zero time vector.
  • Fixed a bug where constructing a ModelProcessor from a Model object led to an invalid Model.
  • Fixed a bug where MocoTrajectory::generateSpeedsFromValues() was accidentally deleting auxiliary state variables.
  • Fixed a bug preventing deserialization of MocoFrameDistanceConstraint.
  • Fixed a bug prevent CoordinateCouplerConstraint from using functions with multiple independent coordinates.
  • IMU::calcGyroscopeSignal() now correctly reports angular velocities in the IMU frame.
  • Fixed a bug in Python scripting where using to_numpy() with RowVectorView created Python arrays with incorrect data.


  • Fixed bug where the application visualizer was getting disconnected on extended idle time.
  • Fixed bug where the toolbar is displaced or becomes invisible after resizing the application window
  • Made graphical selection of markers and path-points more robust among overlapping objects
  • Removed offset added to experimental data while previewing. 
  • Fixed issue where visual selection and properties window were not kept in sync.

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.