API  4.4
For C++ developers
MocoTrack: motion tracking

For some research applications in musculoskeletal biomechanics, it is not sufficient to perform a simulation where model kinematics are prescribed directly from experimental data.

These approaches, called 'inverse' problems, are ubiquitous and useful (see MocoInverse), but provide no way to explain how a change in a system parameter or optimization criteria might affect the optimal kinematics of the system. A different class of problems, called 'tracking' problems, addresses this limitation by freeing up model kinematics while adding a cost term that computes the error between experimental data and the associated model quantities. While tracking problems have been historically either difficult to pose or computationally burdensome, recent methods using direct collocation for solving tracking problems in biomechanics have proven this now to be a viable tool [1, 2].

In Moco, you can use the MocoTrack tool to solve tracking optimization problems. The MocoTrack tool accepts both marker trajectory and model coordinate kinematic data sets and adds a MocoMarkerTrackingGoal and/or MocoStateTrackingGoal term(s) accordingly. Both types of kinematic data can be tracked simultaneously and weights for each cost term can be supplied. In addition, weights can be set for individual components of tracked data sets (e.g., tracking markers on bony landmarks preferentially over markers on soft tissue).

Additional features provided by MocoTrack include: ensuring that the problem time window is consistent with all data sets, filling in missing coordinate speed states to track if only coordinate values are available, and appending tracking data to the problem initial guess.

Examples in the Moco distribution:

[1] Lin Y., Pandy M., 2017, Three-dimensional data-tracking dynamic optimization simulations of human locomotion generated by direct collocation. Journal of Biomechanics 59, 1-8.
[2] Nguyen V. et al., 2019, Bilevel Optimization for Cost Function Determination in Dynamic Simulation of Human Gait. IEEE Transactions on Neural Systems and Rehabilitation Engineering, DOI: 10.1109/TNSRE.2019.2922942.