MuscleParamOptimizer icon indicating copy to clipboard operation
MuscleParamOptimizer copied to clipboard

Optimizing planarflexors fails with LaiArnold2017 model update

Open GraceEMc opened this issue 3 years ago • 6 comments

Hi there, Thank you for sharing your code. I am trying to run the tool using this model: https://simtk.org/frs/?group_id=1302

I am not able to optimise the gastroc, soleus and plantar flexors with the following error: image

Do you know why this occurs? Thanks

GraceEMc avatar Sep 01 '22 06:09 GraceEMc

Hello, the error is about indexing, so I would recommend first checking that you are looping starting from 0, if you are going through OpenSim sets. If that's not the issue, could you please try this version of the MATLAB tool? https://github.com/modenaxe/MuscleParamOptimizer/tree/updOS4 and let me know if it works? Cheers, Luca

modenaxe avatar Sep 02 '22 01:09 modenaxe

Hi Luca,

Thanks for getting back to me, I am not sure what you mean by looping starting from 0, I am just using the example script and replacing the ref and target models. I tried the other tool and had the same error. I think the issue is the matrix returned as Mus_ref from sampleMuscleQuantities(osimModel_ref,curr_mus,'all',N_eval) is size 100x5, whilst sampleMuscleQuantities(osimModel_targ,curr_mus_scaled,'MTL',N_eval) returns MTL_targ as a 100x1 double. Hence it cannot be indexed by the okList as size 1000x1.

Cheers, Grace


From: Luca Modenese @.> Sent: Friday, 2 September 2022 10:35 AM To: modenaxe/MuscleParamOptimizer @.> Cc: Grace Eva McConnochie (Student) @.>; Author @.> Subject: Re: [modenaxe/MuscleParamOptimizer] Optimizing planarflexors fails with LaiArnold2017 model update (Issue #21)

CAUTION: External email. Only click on links or open attachments from trusted senders.


Hello, the error is about indexing, so I would recommend first checking that you are looping starting from 0, if you are going through OpenSim sets. If that's not the issue, could you please try this version of the MATLAB tool? https://github.com/modenaxe/MuscleParamOptimizer/tree/updOS4https://github.com/modenaxe/MuscleParamOptimizer/tree/updOS4 and let me know if it works? Cheers, Luca

— Reply to this email directly, view it on GitHubhttps://github.com/modenaxe/MuscleParamOptimizer/issues/21#issuecomment-1234954301, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AVJ4KJPOL6OBC26ST2SGBTLV4FHG7ANCNFSM6AAAAAAQCAX3XY. You are receiving this because you authored the thread.Message ID: @.***>

GraceEMc avatar Sep 02 '22 02:09 GraceEMc

It could also be that the tool has troubles navigating through the knee, since some dof are coupled with flexion. Could you verify if the issue is present also with models with a simpler knee, e.g. gait2392? At least we will know if the issue is due to the tool or to the application to the Lai model specifically. Luca

modenaxe avatar Sep 02 '22 05:09 modenaxe

Yes I think it is an issue with the model - I tried with 2 different gait2392 models and didn't have any errors.

GraceEMc avatar Sep 03 '22 04:09 GraceEMc

Hi @GraceEMc , any update about this issue?

modenaxe avatar Apr 12 '23 01:04 modenaxe

Hi @modenaxe, thanks for following up on this. I have only be able to continue using the Lai 2017 model by avoiding adjusting the muscles: ["tibpost","gaslat","gasmed","perbrev","perlong","soleus","tibant"] which all fail. So it likely is an issue with the knee flexion. If you have any potential workarounds that would allow me to also optimize these muscles please let me know.

GraceEMc avatar Apr 13 '23 01:04 GraceEMc