GRF error

New project for OpenCap, which is a new software package to estimate 3D human movement dynamics from smartphone videos. OpenCap strongly relies on OpenSim.
POST REPLY
User avatar
Sandra Salvador
Posts: 11
Joined: Mon Mar 07, 2022 1:13 pm

GRF error

Post by Sandra Salvador » Thu Dec 12, 2024 9:40 am

Hello,

I hope this message finds you well. I am working on estimating the ground reaction forces (GRF) and joint moments during a side cutting movement, but I am not consistently obtaining results.

I included one degree of freedom (DoF) for the knee in the model. I added this DoF to the scaled model I downloaded from OpenCap. Then, I made some modifications to the scripts.

I added a new motion type called other_withKA in the file settingOpenSimAD.py, which includes knee adduction. I also updated the model name in the following files: utilsOpenSimAD.py, utilsProcessing.py, and mainOpenSimAD.py.

Typically, the script example_kinetics.py runs successfully after these changes. However, the results are not consistent even when using the same movement, setup, and conditions on the same day.

One issue I noticed is that sometimes the resultant GRF is zero in the final step before the change of direction. I initially thought this might be caused by a delay, but I have experimented with different time ranges, and it does not seem to resolve the issue.

This is the message I received in the Anaconda prompt when I ran example_kinetics.py, along with the output in the Excel file.
example_kinetics.PNG
example_kinetics.PNG (55.98 KiB) Viewed 200 times
GRF_opencap.PNG
GRF_opencap.PNG (42.75 KiB) Viewed 200 times
Sometimes, I get data, for example, with a time range of 2.6 to 3.2 seconds, I got results starting at 3.0 seconds. However, when I use a different time range, such as 3.0 to 3.5 seconds, it doesnt produce the same results.

Can you help me with this? Do you need more information? Maybe I can send you the scripts that I changed.

Thank you very much.

User avatar
Matt Petrucci
Posts: 216
Joined: Fri Feb 24, 2012 11:49 am

Re: GRF error

Post by Matt Petrucci » Thu Dec 12, 2024 11:42 am

Hi Sandra,

Have you tried loading the motion into OpenSim and visualizing? The model may be coming out of contact with the ground for some reason and visualizing may give you some clues.

Hope this helps,
Matt

User avatar
Sandra Salvador
Posts: 11
Joined: Mon Mar 07, 2022 1:13 pm

Re: GRF error

Post by Sandra Salvador » Fri Dec 13, 2024 6:54 am

Hi!

Thanks for your quick response.
Yes, I have checked, and in some trials, the model loses contact with the ground.

However, in this case, it doesnt. When I analyzed the time range from 3.4 to 3.9 seconds (which, according to OpenSim, appears to be the foot contact time), I got data starting at 3.8 seconds.
3.4-3.9.PNG
3.4-3.9.PNG (23.5 KiB) Viewed 130 times
Then, I tried running the code with the time range 3.8 to 4.3 seconds, but I didnt get any results.
3.8-4.3.PNG
3.8-4.3.PNG (25.31 KiB) Viewed 130 times
I am not sure why this is happening, which makes it difficult to determine the exact timing of the foot contact.

Thank you very much,

Sandra Salvador

User avatar
Matt Petrucci
Posts: 216
Joined: Fri Feb 24, 2012 11:49 am

Re: GRF error

Post by Matt Petrucci » Tue Dec 17, 2024 4:00 pm

Hi Sandra,

These optimizations are non-convex so there are multiple feasible solutions to the same problem. Thus, changing the time range can affect things. That is, if you are starting and stopping the optimizer in a different part of the motion, the optimizer might find a slightly different solution that satisfies the constraints and objectives of the problem.

Have you tried running the simulations with the single knee DOF? If it's helpful, there was a great post over the OpenSim forum about computing knee adduction moments, and adding that DOF: viewtopicPhpbb.php?f=91&t=19238&p=0&sta ... 44b17c7215

If your main goal is to compute knee adduction moments, this might be the better approach.

Hope this helps,
Matt

User avatar
Sandra Salvador
Posts: 11
Joined: Mon Mar 07, 2022 1:13 pm

Re: GRF error

Post by Sandra Salvador » Wed Dec 18, 2024 4:30 am

Hi!

Great, I will take a look!

Thank you very much for your help!

Sandra

POST REPLY