constraint issue

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
David Walker
Posts: 13
Joined: Tue Jun 02, 2009 9:48 pm

constraint issue

Post by David Walker » Mon Jul 29, 2013 12:33 pm

Hello all

I am currently using a simmspline constraint to couple the x translation of my thorax to the x translation of my scapula. I am currently using the constraint listed below.

<CoordinateCouplerConstraint name="Thorax_tx_constraint">
<isDisabled>false</isDisabled>
<coupled_coordinates_function>
<SimmSpline>
<x> -1.57 1.57</x>
<y> -1.57 1.57</y>
</SimmSpline>
</coupled_coordinates_function>
<independent_coordinate_names> scapula_tx</independent_coordinate_names>
<dependent_coordinate_name>thorax_tx</dependent_coordinate_name>
</CoordinateCouplerConstraint>

Can someone look at this and see why I am not getting the same translation in my thorax.

User avatar
Ayman Habib
Posts: 2248
Joined: Fri Apr 01, 2005 12:24 pm

Re: constraint issue

Post by Ayman Habib » Mon Jul 29, 2013 1:14 pm

Hi David,

Is there a reason to use the more complicated SimmSpline over a linear function in this case? The linear function would look like this (for a slope of 1 and intercept of 0):

Code: Select all

<LinearFunction>
   <coefficients>1 0</coefficients>
</LinearFunction>
Please try that and let us know how it goes,
-Ayman

User avatar
David Walker
Posts: 13
Joined: Tue Jun 02, 2009 9:48 pm

Re: constraint issue

Post by David Walker » Mon Aug 05, 2013 2:19 pm

Ayman

I hope all is well. The solution you gave me for putting in my constraint between my scapula and thorax still gave me the same solution as when I implement simmspline. It moves the scapula. I would not expect this because the scapula_tx coordinate is the independent. I would like to have the thorax translate in the x direction at the same distance as the scapula. Please look at this as it does not make sense to me as to why it’s doing this.

Best regards
David Walker

P.S. - The constraint is "Thorax_tx_constraint". I attached the files necessary to simulate the issue. If you comment out the constraint the scapula is now positioned properly. I would not expect it to move because of the constraint. I want the thorax to move in the X-direction coupled with the scapula.

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

Re: constraint issue

Post by Ajay Seth » Mon Aug 05, 2013 3:51 pm

When you use a linear function with a slope of 1 you get the same problem? As you describe, you want to set the scapula_tx and have the thorax_tx be the same value? Are they different or the same at different value from what you set originally? Are there other constraints in the model? OpenSim will vary the values of all coordinates in order to satisfy the constraints imposed and that might change the original scapula_tx.

User avatar
David Walker
Posts: 13
Joined: Tue Jun 02, 2009 9:48 pm

Re: constraint issue

Post by David Walker » Mon Aug 12, 2013 2:04 pm

Hey AJ

Yes I get the same thing using the linear function. I don't have any constraints where the scapula_tx is the dependent variable so I would think it would not change. They are the exact same and the thorax_tx generalized coordinate has not been specified in the motion file. It is a dependent variable in the linear constraint "thorax_tx_constraint"

best regards
David Walker

POST REPLY