osim file documentation

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Tim Dorn
Posts: 125
Joined: Tue Feb 26, 2008 10:14 pm

osim file documentation

Post by Tim Dorn » Mon Apr 28, 2008 5:51 pm

Hi.
I'm not sure if this is a silly question but is there a manual or documentation on the structure of the osim model file. The users guide has great xml explinations of the simtrack application (i.e. what each tag represents), but I can't find anything on the actual osim model file.

Thanks,

Tim

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

RE: osim file documentation

Post by Ayman Habib » Tue Apr 29, 2008 5:23 pm

Hi Tim,

That's a very good question, and we plan to have that in the User's Guide (which is still under construction). However, the model file format is undergoing a major restructuring so the documentation will follow soon after it has been reworked. For the time being you can inspect existing simple models that we distribute with OpenSim.

Good luck,
-Ayman

User avatar
Morgan Sangeux
Posts: 8
Joined: Sun Sep 07, 2008 9:14 pm

RE: osim file documentation

Post by Morgan Sangeux » Wed Jan 14, 2009 7:40 pm

Hi,
I intend to write a load_into_matlab function for the *.osim model.
I would like to know if you've stabilized the format of the *.osim model (and have a documentation?) now?
Thanks

User avatar
Tom Correa
Posts: 5
Joined: Thu Mar 27, 2008 5:43 pm

RE: osim file documentation

Post by Tom Correa » Thu Jan 15, 2009 5:48 pm

For personalizing OpenSim models with joint centres/muscle points/muscle parameters such as maximum isometric force, it is clearly desirable to write modifying programs using software such as MATLAB, and apply them to a structure of the OSIM model file (rather than manually modifying the model file using the OpenSim GUI).

In order to do this, parsing functions are needed to read and write the OSIM file to/from the MATLAB (or other) structure. With the new OSIM file format, have such parsing functions already been developed and would they be able to be published/shared?

User avatar
Glen Lichtwark
Posts: 30
Joined: Mon Nov 19, 2007 10:02 pm

RE: osim file documentation

Post by Glen Lichtwark » Mon Jan 19, 2009 5:59 pm

I am using the the xml_io_tools posted on Matlab Central (http://www.mathworks.com/matlabcentral/ ... ange/12907). The xml_read and xml_write functions work very well and correctly read and write. However, I recall that I had to make a couple of changes to get this to work. If you cannot get this to work, contact me directly and I can send you the m-files I have which have the corrections.

User avatar
Morgan Sangeux
Posts: 8
Joined: Sun Sep 07, 2008 9:14 pm

RE: osim file documentation

Post by Morgan Sangeux » Mon Jan 19, 2009 8:47 pm

Hi Glen,
Thanks for that. I am already using the package you are talking about. But the direct output of it is quite difficult to use properly. That's why I've got an additional function that reorganize things so that you have the same kind of architecture than the one you can see on the OpenSim navigator view. It make things easier to build additional Matlab functions.
Obviously the function on top of xml_io_tools highly depends on the architecture of the input xml file.

User avatar
Ajay Sonar
Posts: 11
Joined: Thu Sep 23, 2010 8:54 am

RE: osim file documentation

Post by Ajay Sonar » Wed Oct 06, 2010 6:35 pm

Hi Morgan,

I am a beginner to OpenSim and osim model file to figure out how to add new joints. I tried the xml_io_tools to read in the example BothLegs.osim file and write it back with a different name without any modification to see how it works and when I try to load it, I get an error 'Body: has no joint..Model initialization aborted'. Do you have any example on how to correctly write it back to osim file.

Thanks,
Ajay

User avatar
Anne Schmitz
Posts: 76
Joined: Thu May 31, 2007 7:44 am

RE: osim file documentation

Post by Anne Schmitz » Thu Oct 07, 2010 11:00 am

I noticed some difficulty as well when using xml_write in the xml_io_tools. The toolbox gets mixed up if it finds ::. Instead, I used xml_write and used the Xerces xml engine (you can specify this as a preference for your input).

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

RE: osim file documentation

Post by Ayman Habib » Thu Oct 07, 2010 11:03 am

Hi Ajay,

The osim file format changes over time as we introduce new functionality/objects or rearrange the representation for better use. To be backward compatible, every osim file contains a header with a version number. It's possible that the code you're using assumes a specific version of the software and have not been updated to the actual version of OpenSim you're using.

To work around this, you have to either find out what version was assumed and use osim files from that version of the software or tweak the code to account for the latest format.

A much better way to do this (if you have a C++ development environment) would be to use the OpenSim API and call methods on the Model/Objects as these are more robust and less subject to change in formatting.

Please let me know if you need help following this approach.

Good luck,
-Ayman

User avatar
Ajay Sonar
Posts: 11
Joined: Thu Sep 23, 2010 8:54 am

RE: osim file documentation

Post by Ajay Sonar » Thu Oct 07, 2010 12:44 pm

Anne,

The help says default engine used by xml_write is Xerces. I also tried to specify this explicitly in the input but still get the same error.

Ajay

POST REPLY