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
Scale_Setup.xml and Scale_MarkerSet.xml
- Emil Walczak
- Posts: 50
- Joined: Fri Feb 06, 2015 6:45 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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!
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!
- Ursula Trinler
- Posts: 50
- Joined: Tue Mar 05, 2013 3:33 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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
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
- Alice Siegel
- Posts: 4
- Joined: Wed Dec 10, 2014 4:37 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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
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
- Ursula Trinler
- Posts: 50
- Joined: Tue Mar 05, 2013 3:33 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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
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
- Alice Siegel
- Posts: 4
- Joined: Wed Dec 10, 2014 4:37 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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
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
- Stefan Lambrecht
- Posts: 13
- Joined: Tue May 31, 2011 6:43 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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).
- Alice Siegel
- Posts: 4
- Joined: Wed Dec 10, 2014 4:37 am
Re: Scale_Setup.xml and Scale_MarkerSet.xml
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
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