Page 1 of 1

Scaling and IK of OpenSIM

Posted: Mon Apr 01, 2019 3:58 am
by inbae908
Hi, everyone. Please understand that I'm still a beginner in OpenSIM.
I already have my own dataset in TRC file. I wanted to scale das3(Dynamic Arm Simulator) model so that I can input the TRC file and implement the Inverse Kinematics function. I located the analytical markers in the same position as the experimental markers and used the scale tool, but what I got is a model with a distorted arm which doesn't make sense. I tried the Inverse Kinematics function anyways to see what happens, and the distorted model does move but in the same weird position.

What I first thought was maybe my TRC file has a different XYZ coordinate system, so I previewed my experimental data and tried rotating it in x, y, and z axis. However, when I tried to scale my model again with the rotated experimental data, the scaling process is never complete and is paused at "Step 3: Placing markers on model."

Can anyone help me out with this problem? I'd be so happy to see my model work successfully :(

Re: Scaling and IK of OpenSIM

Posted: Tue Apr 02, 2019 11:37 pm
by mitkof6
Hi,

It is possible that the model is fixed with respect to the ground frame. If the experimental markers have an offset with respect to the model, then IK cannot position the model correctly since it is welded to the ground. In this case, you can add a free joint (6DOF) between the ground and the base body (e.g., thorax).

Re: Scaling and IK of OpenSIM

Posted: Thu Apr 04, 2019 1:35 am
by inbae908
Thank you for your comment, Dimitar.

I tried changing the parent frame of the markers to the corresponding body set from the properties tab. Then I fixed the markers to the model. ( Not sure if this is the right thing to do.)
However, I still don't know how to check if my 'model' is fixed with respect to the ground frame. Also, how do I add a free joint into the model in OpenSIM GUI? I tried to follow your instructions but couldn't find a way to do it.

Re: Scaling and IK of OpenSIM

Posted: Thu Apr 04, 2019 12:39 pm
by aymanh
Hello,

The user interface/GUI doesn't allow for addition/deletion of Joints as of now. You'll have to do it through either the XML file or some scripting environment (Python, GUI or Matlab). The OpenSim 4.0 distribution has example scripts to add joint/body/geometry to an existing model.

Hope this helps,
-Ayman

Re: Scaling and IK of OpenSIM

Posted: Thu Apr 04, 2019 9:40 pm
by inbae908
Hello,
I found the reason why the model's arm was in a distorted position! It was because the experimental data was rotated 180 degrees in the y-axis from the model. I followed the instructions from viewtopicPhpbb.php?f=91&t=6692&p=0&start=0&view=
Rotated the experimental data so that it conforms to the OpenSIM model, and then saved it.

However, when I tried scaling the model to the new rotated experimental data, the process is never complete and is paused at "Step 3: Placing markers on model." Below is what is written in the Messages. Is it because OpenSIM couldn't find the vtp files stated in the message? I'm confused because scaling process was complete even though the results weren't good when I used the unrotated experimental data.

Loaded marker file E:\MotionCapture\transformed_upperbody_static.trc (9 markers, 80 frames)
Loaded marker file E:\MotionCapture\transformed_upperbody_static.trc (9 markers, 80 frames)
Couldn't find file 'rclavicle.vtp'.
Couldn't find file 'rscapula.vtp'.
Couldn't find file 'rhumerus.vtp'.
Couldn't find file 'rulna.vtp'.
Couldn't find file 'rradius.vtp'.

Step 2: Scaling generic model
Couldn't find file 'rclavicle.vtp'.
Couldn't find file 'rscapula.vtp'.
Couldn't find file 'rhumerus.vtp'.
Couldn't find file 'rulna.vtp'.
Couldn't find file 'rradius.vtp'.
Couldn't find file 'rclavicle.vtp'.
Couldn't find file 'rscapula.vtp'.
Couldn't find file 'rhumerus.vtp'.
Couldn't find file 'rulna.vtp'.
Couldn't find file 'rradius.vtp'.
Couldn't find file 'rclavicle.vtp'.
Couldn't find file 'rscapula.vtp'.
Couldn't find file 'rhumerus.vtp'.
Couldn't find file 'rulna.vtp'.
Couldn't find file 'rradius.vtp'.
Couldn't find file 'rclavicle.vtp'.
Couldn't find file 'rscapula.vtp'.
Couldn't find file 'rhumerus.vtp'.
Couldn't find file 'rulna.vtp'.
Couldn't find file 'rradius.vtp'.

Step 3: Placing markers on model

Re: Scaling and IK of OpenSIM

Posted: Sun Apr 07, 2019 2:14 am
by mitkof6
Hi,

You can save the scaled mode in the same folder as is the original model and reopen it in the GUI. The reason for this, is that the model uses custom geometries that do not ship with OpenSim.

Did you solve the first problem? From the description it seems that you haven't unlocked the model with respect to the ground frame.