DeGrooteFregly2016Muscle exportTendonForceMultiplierToTable

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Xiao Hu
Posts: 21
Joined: Fri Jun 26, 2009 9:25 am

DeGrooteFregly2016Muscle exportTendonForceMultiplierToTable

Post by Xiao Hu » Tue Oct 26, 2021 7:30 am

When I am exporting tendon force multiplier in the DeGrootFregly2016Muscle, I get NANs. Does anyone know why? Thanks!

Code: Select all

import org.opensim.modeling.*
DGF_model = DeGrooteFregly2016Muscle();
DGF_tendon_osimDataTbl = DGF_model.exportTendonForceMultiplierToTable();
Example output shown below:
time tendon_force_multiplier
0: 0.9500 nan
1: 0.9505 nan
2: 0.9510 nan
3: 0.9515 nan
4: 0.9520 nan
5: 0.9525 nan
6: 0.9530 nan
7: 0.9535 nan
8: 0.9540 nan
9: 0.9545 nan
10: 0.9550 nan
11: 0.9555 nan
12: 0.9560 nan
13: 0.9565 nan
14: 0.9570 nan
15: 0.9575 nan
16: 0.9580 nan
17: 0.9585 nan
18: 0.9590 nan
19: 0.9595 nan
20: 0.9599 nan
21: 0.9604 nan
22: 0.9609 nan
23: 0.9614 nan
24: 0.9619 nan

User avatar
Sepehr Ramezani
Posts: 35
Joined: Tue Nov 05, 2019 2:02 pm

Re: DeGrooteFregly2016Muscle exportTendonForceMultiplierToTable

Post by Sepehr Ramezani » Fri Oct 29, 2021 7:42 am

Hi Xiao,
I believe you need a normTendonLengths to feed this function.
You have two other options:
1- Using GUI, plot->tendon force
2- Change the coordinate using updCoordinateSet() -> realizePosition() then use getTendonForce() to calculate tendon force. https://simtk.org/api_docs/opensim/api_ ... bf33672421
I recommend last method.
Also you may check this post viewtopicPhpbb.php?f=91&t=8713&p=0&star ... 874d6314f1
Best,
Sepehr

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

Re: DeGrooteFregly2016Muscle exportTendonForceMultiplierToTable

Post by Nicholas Bianco » Fri Oct 29, 2021 3:22 pm

I second Sepehr's suggestions. Thanks Sepehr!

POST REPLY