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.
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.
GRF error
- Matt Petrucci
- Posts: 216
- Joined: Fri Feb 24, 2012 11:49 am
Re: GRF error
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
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
- Sandra Salvador
- Posts: 11
- Joined: Mon Mar 07, 2022 1:13 pm
Re: GRF error
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. Then, I tried running the code with the time range 3.8 to 4.3 seconds, but I didnt get any results. 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
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. Then, I tried running the code with the time range 3.8 to 4.3 seconds, but I didnt get any results. 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
- Matt Petrucci
- Posts: 216
- Joined: Fri Feb 24, 2012 11:49 am
Re: GRF error
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
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
- Sandra Salvador
- Posts: 11
- Joined: Mon Mar 07, 2022 1:13 pm
Re: GRF error
Hi!
Great, I will take a look!
Thank you very much for your help!
Sandra
Great, I will take a look!
Thank you very much for your help!
Sandra