I am using the APIs to create my model and calculate muscle lengths at different positions of the model.
What does it mean when I use getTendonLength and get a -ve value?
How can a tendon be conpressed? What does that mean?
Can someone help me?
Tendon Length is a negative value
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Tendon Length is a negative value
It is strange, can you post the code? Why do you care about the tendon length and not the muscle length?
- Julie Iskander
- Posts: 11
- Joined: Thu Mar 10, 2016 9:25 pm
Re: Tendon Length is a negative value
rjointCoordinateSet[1].setValue(si, convertDegreesToRadians(-32), true);
cout << "Muscle Fiber Length at -32 Abduction" << endl;
for (int i = 0; i < 6; i++)
{
cout << muscles->getName() << " - ";
cout << muscles->getLength(si) << " - " << muscles->getFiberLength(si) << " - " << muscles->getTendonLength(si)<< endl;;
}
I was just moving the model and getting new values of the muscle.
Why don't FiberLength change to reflect compression or elongation of muscle? Only Length and TendionLength?
cout << "Muscle Fiber Length at -32 Abduction" << endl;
for (int i = 0; i < 6; i++)
{
cout << muscles->getName() << " - ";
cout << muscles->getLength(si) << " - " << muscles->getFiberLength(si) << " - " << muscles->getTendonLength(si)<< endl;;
}
I was just moving the model and getting new values of the muscle.
Why don't FiberLength change to reflect compression or elongation of muscle? Only Length and TendionLength?
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Tendon Length is a negative value
I think you have to realize the state to position. model.realizePosition(si)
- Julie Iskander
- Posts: 11
- Joined: Thu Mar 10, 2016 9:25 pm
Re: Tendon Length is a negative value
realizePosition is not accessable from Model class
- Dimitar Stanev
- Posts: 1096
- Joined: Fri Jan 31, 2014 5:14 am
Re: Tendon Length is a negative value
It is possible that this method is supported in the newest version of OpenSim that I use or you haven't included the headers. You can try this also:
Best
Code: Select all
model.getMultibodySystem().realize(si, Stage::Position);
- Julie Iskander
- Posts: 11
- Joined: Thu Mar 10, 2016 9:25 pm
Re: Tendon Length is a negative value
Thanks a lot
It worked with the following lines together
It worked with the following lines together
Code: Select all
osimModel.getMultibodySystem().realize(si, Stage::Position);
osimModel.equilibrateMuscles(si);