segment power analysis

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: segment power analysis

Post by Carlos Gonçalves » Tue Mar 21, 2023 4:52 pm

Thanks Nick. I will try it down the line.

But until then, the challenge to me would be converting the forces from all contact surfaces on the feet to a single vector in the "virtual force platform" file. I already managed to get the sum of all force vectors (X,Y,Z) but not yet the position of the GRF vector in lab space.

If someone can share a tip or advice, that would be wonderful. With that, I think is creating a version of the model where the contact forces are removed from the ForceSet, and them follow the normal procedures in OpenSim documentation.

What you think?

Best regards.

User avatar
Nicholas Bianco
Posts: 962
Joined: Thu Oct 04, 2012 8:09 pm

Re: segment power analysis

Post by Nicholas Bianco » Wed Mar 22, 2023 10:38 am

Hi Carlos,

I recently added changes to 'createExternalLoadsTableForGait' to compute center of pressure locations: https://github.com/opensim-org/opensim- ... s.cpp#L321.

You could recreate this for your pipeline to get the position of the GRF vector in the lab space.

-Nick

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: segment power analysis

Post by Carlos Gonçalves » Wed Mar 22, 2023 6:23 pm

Great!!!

I will start with that. Thanks a lot for the help.

I will get back here with some results (fingers crossed) or more doubts :lol:

Best regards.

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: segment power analysis

Post by Carlos Gonçalves » Wed Mar 20, 2024 5:12 pm

Hello Nick and everyone.

I saw that the OpenSim 4.5 had enhancements in Moco as well.

https://simtk-confluence.stanford.edu:8 ... =130187315
The utility function createExternalLoadsTableForGait() now outputs center of pressure locations for foot-ground contact force elements.
So, does it mean I can run it, get the resultant contact force for each foot, and load it to IAA in OpenSim?

(fingers crossed emoji).

Best regards.

User avatar
Nicholas Bianco
Posts: 962
Joined: Thu Oct 04, 2012 8:09 pm

Re: segment power analysis

Post by Nicholas Bianco » Thu Mar 21, 2024 3:37 pm

Hi Carlos,

I realized recently that while the COPs are now included, I don't think I'm computing the "vertical" torque that you would normally expect; I'm just returned the summed contact sphere torques. (Adding the COPs was mainly for visualization purposes, I should have include the vertical torque while I was at it -- my bad!)

But it should be relatively easy to recreate the calculations based on the source code for this utility and modify them to get exactly what you need for IAA. If you want to give that a shot I could port it back into the OpenSim utility.

-Nick

User avatar
Carlos Gonçalves
Posts: 127
Joined: Wed Jun 08, 2016 4:56 am

Re: segment power analysis

Post by Carlos Gonçalves » Thu Mar 21, 2024 5:18 pm

Hello Nick,

Let's give it a try, for sure! I'm currently in "writing mode", so I will get back to this soon (I hope).

And don't worry. I just can say "Thank you Moco Team" for all that you guys had been doing. It is the main tool for my research, and as years went by, each new version solved something I needed :D .

I will keep updating this thread with my results and doubts.

Best regards.

User avatar
Nicholas Bianco
Posts: 962
Joined: Thu Oct 04, 2012 8:09 pm

Re: segment power analysis

Post by Nicholas Bianco » Fri Mar 22, 2024 11:55 am

Sounds good, Carlos! Glad to hear Moco has been a reliable research tool for you :)

POST REPLY