Page 1 of 1

WeldConstraint problem

Posted: Thu Aug 09, 2012 1:22 am
by michalacadova
Hi to all.
I am having problem with the introduction of the WeldConstraint to my model. As I described previously (https://simtk.org/forums/viewtopic.php?f=91&t=3636), my model consists of a fixed skull (upper jaw) and the movable mandible (lower jaw). These two parts I want to connect with two temporomandibular joints (TMJ). Therefore, I get the close loop. The advice was to cut the mandible to two parts (jawL and jawR), each of them will be connected with its own TMJ and then, both parts of the jaw will be put together using the WeldConstraints. This I have done as follows:

<!--Constraints in the model.-->
<ConstraintSet name="">
<WeldConstraint name="">
<isDisabled> false </isDisabled>
<body_1> jawL </body_1>
<body_2> jawR </body_2>
<location_body_1> 0 0 0 </location_body_1>
<orientation_body_1> 0 0 0 </orientation_body_1>
<location_body_2> 0 0 0 </location_body_2>
<orientation_body_2> 0 0 0 </orientation_body_2>
</WeldConstraint>
<objects/>
<groups/>
</ConstraintSet>

I am not really sure, what <location_body_1> and <orientation_body_1> (as well as <location_body_2> and <orientation_body_2>) means. But like this, only the “jawR” to which the markers is connected (therefore the “jawR” is associated with the motion) moves (after running the Inverse Kinematics). No the left part. What is wrong?

Michala

Re: WeldConstraint problem

Posted: Tue Aug 14, 2012 7:25 am
by michalacadova
Hi to all,
I still didn’t solve my problem with the WeldConstraint. I included the model and the movement (.trc file as well as the results from the inverse kinematics) so that you can see my problem – the WeldConstraint which should keep the two parts of the jaw together seems not to work :( .

Thanks for any hints

Michala

Re: WeldConstraint problem

Posted: Tue Aug 14, 2012 2:14 pm
by aseth
You need to add the constraint inside the ConstraintSet's objects list in the .osim file. Look at any other Set as an example. If the navigator does not list a component, it means it was not read in and if there was no "Object not found" error it usually is an error in the XML format.
We are working on model creation tools to avoid these problems in the future.

Re: WeldConstraint problem

Posted: Wed Aug 15, 2012 12:47 am
by michalacadova
Hi,
Thank you very much, it helped ;) ! It was such a small mistake – I didn’t included a name of the WeldConstraint, and therefore the “Constraints” under the Navigator window of the model were empty – I didn’t check that :(.

So here is the part of the .osim model which works:

<ConstraintSet name="">
<objects>
<WeldConstraint name="TwoJawFixJoint">
<isDisabled> false </isDisabled>
<body_1> jawL </body_1>
<body_2> jawR </body_2>
<location_body_1> 0.032 0.02 -0.01 </location_body_1>
<orientation_body_1> 0 0 0 </orientation_body_1>
<location_body_2> 0.032 0.02 -0.01 </location_body_2>
<orientation_body_2> 0 0 0 </orientation_body_2>
</WeldConstraint>
</objects>
<groups/>
</ConstraintSet>


Thanky you
Michala