Inverse Kinematics

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Mª del Mar Rodríguez Azor
Posts: 5
Joined: Mon Oct 15, 2012 12:09 pm

Inverse Kinematics

Post by Mª del Mar Rodríguez Azor » Thu Nov 29, 2012 11:58 am

Hello,

I'm trying to do my project using as a base the model of Running Simulation which has got 41 markers, but my model has got 26. I deleted some markers, created new ones and modified others. The problem is that I want to use the Inverse Kinematics tool, using the data of another external project and I have to modify the files ended in ".trc" and ".xml" . I modified the file ".trc" (I think I did well) but I don't know what I have to change in the file ".xml".

Moreover, if there is something that I should know for the correct use of that tool, please, tell me.

Thank you very much.

Regards,

Mª del Mar

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

Re: Inverse Kinematics

Post by Ayman Habib » Thu Nov 29, 2012 2:38 pm

Hi,

XML files can be edited using any text editor (e.g. Notepad or visual studio). If you use an XML-editor (e.g. notepad++ or XML-Marker) you get some color coding, hierarchical-representation and highlighting which can be useful. I'm not sure which file specifically you're modifying (MarkerSet?, Tasks? Setup-file?) so please provide more information so that we can help you.

Best regards,
-Ayman

User avatar
Mª del Mar Rodríguez Azor
Posts: 5
Joined: Mon Oct 15, 2012 12:09 pm

Re: Inverse Kinematics

Post by Mª del Mar Rodríguez Azor » Mon Dec 03, 2012 2:37 am

Sincerely, I'm not sure which file ".xml" I have to modify or if I have to modify both files (tasks and setup). This software is unfamiliar for me, I don't know using it well. I tried to read the parts of the guide I needed but I think that it's necessary to know a bit the software or read the whole guide to understand it.

I'm waiting your answer.

Thank you very much.

Regards,

Mª del Mar

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

Re: Inverse Kinematics

Post by Ayman Habib » Mon Dec 03, 2012 1:19 pm

Hi,

If you're starting from Gait2354 example or similar setup then:
- Generic model has no Markers in it.
- ScaleTool adds Markers to the model from file gait2354_Scale_MarkerSet.xml (you'll need to modify this file to match your needs)
- IK tasks file gait2354_IK_Tasks.xml contains an entry for each marker you want to track (modify to fit your needs)
- Markers used for scaling appear in gait2354_setup_Scale.xml (modify to fit your needs)
- Marker names appear in the header of the trc files (modify to fit your needs)

Hope this helps,
-Ayman

User avatar
Tim No
Posts: 4
Joined: Mon Nov 12, 2012 3:10 pm

Re: Inverse Kinematics

Post by Tim No » Sun Dec 09, 2012 1:23 am

Hi,

When attempting to use the IK tool, I'm getting the error: "number of workunits cannot be negative". Can you explain what that means?

Thank you,
-Tim

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

Re: Inverse Kinematics

Post by Ayman Habib » Mon Dec 10, 2012 2:05 pm

Hi Tim,

I couldn't locate this error message in our latest code base, what version of OpenSim are you using?

Thanks,
-Ayman

User avatar
Tim No
Posts: 4
Joined: Mon Nov 12, 2012 3:10 pm

Re: Inverse Kinematics

Post by Tim No » Mon Dec 10, 2012 5:31 pm

I am using version 3.0.

Thank you,
-Tim

User avatar
Mª del Mar Rodríguez Azor
Posts: 5
Joined: Mon Oct 15, 2012 12:09 pm

Re: Inverse Kinematics

Post by Mª del Mar Rodríguez Azor » Tue Dec 11, 2012 3:49 am

Hi,

Your answer was helpful but I have other problems now. The estructure of the model is weird and it has several muscles that aren't fixed the body. To modify the muscles, is there any way to know which muscle is wrong? I mean, it's easy to find the name of a marker but it's impossible to select a muscle, so how to know which is it?

Thank you very much.

Regards,

Mª del Mar Rodríguez

User avatar
Mª del Mar Rodríguez Azor
Posts: 5
Joined: Mon Oct 15, 2012 12:09 pm

Re: Inverse Kinematics

Post by Mª del Mar Rodríguez Azor » Tue Dec 11, 2012 9:05 am

Hi,

I've just seen that the model has a weird structure when I put the files to get the simulation. I'm sure that I did something wrong because I don't know what exactly I have to change, but I wondered if one possible mistake is that the coordinates of the markers of the model are totally different to the coordinates from the data. For example, one of the markers of the model has the next coordinates: X=-0.03 Y=0.42 Z=0.15; while the coordinates from the data for time t=0 are: X=-195.211 Y=-420.988 Z=-34.103; so, is this important?

Regards,

Mª del Mar R.

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

Re: Inverse Kinematics

Post by Ayman Habib » Thu Dec 13, 2012 2:56 pm

Hi,

I think the problem may have to do with not knowing the assumptions made about what coordinate frames are the markers represented in. Please consult the documentation page below for a full description
http://simtk-confluence.stanford.edu:80 ... Kinematics

In general, marker specified in the model have coordinates given in a specific body frame, while experimental data (in .trc) files are usually in global frame.

Hope this helps,
-Ayman

POST REPLY