MocoTrack solving with unrealistic motion

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Madison Wissman
Posts: 5
Joined: Wed Aug 23, 2023 12:04 pm

MocoTrack solving with unrealistic motion

Post by Madison Wissman » Mon Nov 11, 2024 2:42 pm

Hi all,

I am working on tracking experimental walking and predicting changes to kinematics when muscles are weakened unilaterally. I started by working with the weakened abductors condition code from the Moco paper and got good results when I changed the code to weaken muscles on only one side, but as I have started to take out some of the symmetry constraints and track the full gait cycle I have gotten unrealistic walking motion (ie. falling over after the first step, feet slipping, taking very short steps) for both the normal tracking condition and the weakened abductors condition. I added bounds to some of the joints, tried using different techniques for weighting joints, and added a periodicity goal to try to combat this which may have constrained the model too much, but I'm unsure of what to add or take out that might help the problem converge on a realistic solution. I've attached the code I've been using below.

Please let me know if you have done anything similar and/or have suggestions!

Best,
Madison
Attachments
run_mocoTrack.txt
(2.65 KiB) Downloaded 51 times
mocoTrackTestpost_weakAbd.txt
(79.41 KiB) Downloaded 17 times

User avatar
Jon Stingel
Posts: 3
Joined: Fri Jan 19, 2018 5:54 pm

Re: MocoTrack solving with unrealistic motion

Post by Jon Stingel » Fri Dec 27, 2024 4:10 pm

Hi Madison,

As you go through removing and changing parts of the tracking problem it can be difficult to get steady consistent results, so you are not alone in that. Based on your description and a quick look through your code, it seems like you might be running into issues of what you are constraining the model to do, and what you would like it to track. A couple thoughts:
  • Have you made sure that the base model (not weakened) can successfully complete a gait cycle with the altered tracking problem formulation?
  • It seems you removed the periodic constraint on the right and left coordinates, but kept the one for the muscle activations between right and left legs. This might be preventing the model from adapting in a unilateral way you might be hoping for, or even preventing the optimizer from finding something that works.
Thanks, hope this is helpful!
Jon

POST REPLY