Page 1 of 1

Tendon Length is a negative value

Posted: Sat Oct 29, 2016 9:20 pm
by julieiskander
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?

Re: Tendon Length is a negative value

Posted: Sun Oct 30, 2016 4:03 am
by mitkof6
It is strange, can you post the code? Why do you care about the tendon length and not the muscle length?

Re: Tendon Length is a negative value

Posted: Sun Oct 30, 2016 9:39 pm
by julieiskander
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?

Re: Tendon Length is a negative value

Posted: Sun Oct 30, 2016 11:44 pm
by mitkof6
I think you have to realize the state to position. model.realizePosition(si)

Re: Tendon Length is a negative value

Posted: Mon Oct 31, 2016 12:11 am
by julieiskander
realizePosition is not accessable from Model class :(

Re: Tendon Length is a negative value

Posted: Mon Oct 31, 2016 2:13 am
by mitkof6
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:

Code: Select all

model.getMultibodySystem().realize(si, Stage::Position);
Best

Re: Tendon Length is a negative value

Posted: Sun Nov 06, 2016 9:24 pm
by julieiskander
Thanks a lot
It worked with the following lines together

Code: Select all

osimModel.getMultibodySystem().realize(si, Stage::Position);
osimModel.equilibrateMuscles(si);