After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Tags:
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jingke,
You can use the OpenSim utility function 'createExternalLoadsTableForGait' to compute contact forces. See example2DWalking for a usage example.
Best,
Nick
You can use the OpenSim utility function 'createExternalLoadsTableForGait' to compute contact forces. See example2DWalking for a usage example.
Best,
Nick
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Thank you very much for your reply, but I want to accurately obtain the contact force generated when the heel and toe respectively contact the ground, rather than the ground reaction force converted to the pressure center.
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jinke,
If you want the contact forces from individual contact spheres, you can recreate what 'createExternalLoadsTableForGait' computes internally, and just return the contact sphere forces you want instead.
Best,
Nick
If you want the contact forces from individual contact spheres, you can recreate what 'createExternalLoadsTableForGait' computes internally, and just return the contact sphere forces you want instead.
Best,
Nick
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Nick
I now want to extract the desired output information from the Moco results using the following code:
solution = study.solve();
outputs = StdVectorString();
outputs.add('.*active_force_length_multiplier');
table = study.analyze(solution, outputs);
However, the following warning message appears:
Warning: No outputs were connected to 'reporter' of type TableReporter__double_. You can connect outputs by calling addToReport().
I don't know how to solve this problem, and I hope to receive your reply!
Best,
Jingke
I now want to extract the desired output information from the Moco results using the following code:
solution = study.solve();
outputs = StdVectorString();
outputs.add('.*active_force_length_multiplier');
table = study.analyze(solution, outputs);
However, the following warning message appears:
Warning: No outputs were connected to 'reporter' of type TableReporter__double_. You can connect outputs by calling addToReport().
I don't know how to solve this problem, and I hope to receive your reply!
Best,
Jingke
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jingke,
I noticed you figured out the other reporting issue, did you still need help here?
Best,
Nick
I noticed you figured out the other reporting issue, did you still need help here?
Best,
Nick
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Thank you for your reply. I have already resolved this issue, but now I have encountered another issue. I built a simple exoskeleton robot and connected it to the human body through three bushingforces. Finally, it successfully ran in Moco and achieved the desired results. However, without changing any model parameters, I conducted a moco simulation again. When I ran the solution command, the MATLAB software would automatically crash. After repeated attempts, the software would still automatically crash and exit when solving.I don't know what caused this?
best,
Jingke
best,
Jingke
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Hi Jingke,
Do you have a crash report/dump from Matlab that you could attach?
-Nick
Do you have a crash report/dump from Matlab that you could attach?
-Nick
- Jingke Song
- Posts: 34
- Joined: Tue Oct 19, 2021 4:52 am
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Only one opensim. log file was generated. I found that when I reduce the number of bushingforces, MOCO can simulate successfully, and the fewer bushingforces, the shorter the simulation time.When the number of bushingforces exceeds one, MATLAB software often crashes.
- Attachments
-
- opensim.log
- (18.19 KiB) Downloaded 28 times
- Nicholas Bianco
- Posts: 992
- Joined: Thu Oct 04, 2012 8:09 pm
Re: After using Moco simulation, how to extract the contact force between the sole of the foot and the ground?
Unfortunately that log file doesn't contain any useful information.
How are the bushing forces applied to the model? Is it possible that the forces could be going to infinity and causing a crash? You could try adding infinitely strong residual forces to the model to see if that prevents a crash.
How are the bushing forces applied to the model? Is it possible that the forces could be going to infinity and causing a crash? You could try adding infinitely strong residual forces to the model to see if that prevents a crash.