Scale_Setup.xml and Scale_MarkerSet.xml

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Alice Siegel
Posts: 4
Joined: Wed Dec 10, 2014 4:37 am

Scale_Setup.xml and Scale_MarkerSet.xml

Post by Alice Siegel » Fri Apr 10, 2015 2:55 am

Hello,

I intend to scale my model using .xml files as described in the various tutorials. I would like to create those .xml files using Matlab as I understand it quite well. However, I do not find an Matlab Script for the Scale_MarkerSet.xml file. Does anybody know about it ?

Thank you !
Alice

User avatar
Emil Walczak
Posts: 50
Joined: Fri Feb 06, 2015 6:45 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Emil Walczak » Fri Apr 17, 2015 3:36 am

Hello,

These files should be created only as .xml files. You can change them even in note pad. It's not possible to make .xml files for IK, ID, RRA or CMC with MatLab or C++. But trust me xml is really simple you should't have any problems with it!

User avatar
Ursula Trinler
Posts: 50
Joined: Tue Mar 05, 2013 3:33 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Ursula Trinler » Tue Apr 21, 2015 3:35 am

Hello Alice,

I do not know how to create a .xml file from scratch but what you can do is upload an existing .xml file and change the parameters which you would like to include or change, e.g. the time steps or the subjects characteristics, with the "set" function. I have started to do that for the IK tool:

ikTool = InverseKinematicsTool('C:\Users\Kathinka\Desktop\MATLAB TO OPENSIM\Setup_IK.xml');
ikTool.setStartTime(Time(1,2));
ikTool.setEndTime(Time(1,3));
ikTool.setMarkerDataFileName();

Then you simply output the results (I think "print" is the command https://simtk.org/api_docs/opensim/api_ ... 2fd8415cf5 ). If you have more than one participant just loop it that should work,

Best
Ursula

User avatar
Alice Siegel
Posts: 4
Joined: Wed Dec 10, 2014 4:37 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Alice Siegel » Wed Apr 22, 2015 3:11 am

Hello Emile and Ursula,

Thank you both for your answers. I had already used notepad to change some information in the xml file, as for instance the markers used to scale, the two trc files and the subject name. However I hoped I could output an xml file for any project and any subject, by giving Matlab some simple input information: using a Matlab script that would ask you for a file with your markers, the markers used for scaling, the subject's caracteristics, and it's trc files.
That way, you should'nt have to change the xml file itself for each project and each subject, but only select the files containing the required infomration :)

Thank you a lot for your answer Ursula, I did not know about the 'set' function. However you use the function InverseKinematicsTool; is this a Matlab routine given by OpenSim in the toolbox 'Matlab' in the OpenSim install directory ?

Best,
Alice

User avatar
Ursula Trinler
Posts: 50
Joined: Tue Mar 05, 2013 3:33 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Ursula Trinler » Wed Apr 22, 2015 3:29 am

Hi Alice

I am not sure if I understand your question correctly. These functions are defined in the API of OpenSim (https://simtk.org/api_docs/opensim/api_ ... tated.html). There you can find all commands you can use with MATLAB after you have configurised MATLAB with OpenSim using the configureOpenSim.m file provided in the OpenSim 3.2\Scripts\Matlab folder.

I hope this answers your question!
Best
Ursula

User avatar
Alice Siegel
Posts: 4
Joined: Wed Dec 10, 2014 4:37 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Alice Siegel » Tue May 12, 2015 5:09 am

Hi Ursula,

I actually have a problem using the configureOpensim.m file. It returns muliple errors I did not manage to solve, and this is why I tried to do it on my own... Did you have any poblems using this matlab file ?

Thank you again for your help,

Alice

User avatar
Stefan Lambrecht
Posts: 13
Joined: Tue May 31, 2011 6:43 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Stefan Lambrecht » Tue May 12, 2015 5:17 am

You need to open/run Matlab with administrator privileges (if I am not mistaken there is a step-by-step guide on the OpenSim website with regard to this: http://simtk-confluence.stanford.edu:80 ... ith+Matlab).

User avatar
Alice Siegel
Posts: 4
Joined: Wed Dec 10, 2014 4:37 am

Re: Scale_Setup.xml and Scale_MarkerSet.xml

Post by Alice Siegel » Tue May 12, 2015 5:46 am

Hello Stefan,

Thanks a lot for your help. I had already done this before but I think the problem was that I had 2 OpenSim versions. I now erased the oldest one and with only one OpenSim installaion it worked perfectly.

Thank you,

Alice

POST REPLY