Opensim vs Moco optimization algorithm

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
User avatar
Nicholas Bianco
Posts: 1025
Joined: Thu Oct 04, 2012 8:09 pm

Re: Opensim vs Moco optimization algorithm

Post by Nicholas Bianco » Thu Jul 13, 2023 10:56 am

Hi Vignesh,

I think at this point it would useful to read the OpenSim and Moco papers and documentation to answer your questions in detail. Moco is built into OpenSim and relies on OpenSim's modeling features to enforce multibody dynamic constraints in each direct collocation optimization problem. So anything about the OpenSim model in Moco is the same as any other OpenSim tool.

OpenSim doesn't have one optimization algorithm per se, it's really more of a musculoskeletal modeling toolbox with some optimization and analysis tools included. You can consider Moco as one of these tools, albeit a much larger and more fully featured one.

To give you some specific guidence to your questions:

1) Refer to the documentation (and if you wish, the source code) for the MocoMarkerTrackingGoal. I don't understand what you mean by "so are the mobilizers used as conditions to be matched". Mobilizers are a mathematical concept used by Simbody to define joints, but you should only really care about the coordinates your model has, since these determine the states of the system.

2) Moco supports kinematic constraints. All the other model components you mention here are defined by the OpenSim Model that each MocoProblem manages.

3) As long as the CustomJoint is defined to be equivalent to the desired FreeJoint, there should be no differences.

Best,
Nick

User avatar
Radhakrishnan Vignesh
Posts: 104
Joined: Tue Jun 01, 2021 8:09 am

Re: Opensim vs Moco optimization algorithm

Post by Radhakrishnan Vignesh » Thu Jul 13, 2023 11:13 am

Hello Nicholas,

Thank you for your answers. Just to give some background, I am trying to analyse if the marker residual error is a good metric to determine how well the subsequent analyses would be. And for that, I would like to understand the least squares optimisation and what constraints are to be met.

I have extensively looked at the OpenSim source code but still havent be able to determine the exact script or the general flow of least squares optimisation. Specifically, once we scale the model, how does the scaled model influence the kinematic outcomes? Similar to implementation in papers "Global sensitivity analysis of the joint kinematics during gait to the parameters of a lower limb model" or "kinematic analysis of over-determinate biomechanicsl system", which have an explicit formulation of how model constraints are to be met.

I shall look at MocoMarkerTrackingGoal.

Thanks
Vignesh

POST REPLY