How to upload my own data (having separate files for force and motion)

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Monica Armengol
Posts: 8
Joined: Fri Oct 07, 2016 1:58 am

How to upload my own data (having separate files for force and motion)

Post by Monica Armengol » Tue Aug 01, 2017 10:45 am

Hi,

I am new in OpenSim, I am trying to upload my own motion data into OpenSim. I have the c3d file and the force data is separate in a matlab file (this includes GRF and hand forces). I have modified some of the matlab scripts that allow to convert opensim format to convert: C3D files into trc files and force data into .mot files.

Now, I understand that in OpenSim you can't upload your own movement directly, but you have to choose a model first and then insert the motion (?). I have chosen one model (3DGaitModel2354) although it doesn't have arms. I am not sure what do do now. (1) It seems that it doesn't have markers, do I need to add new markers separately, and then scale them to my own model?. (2) When I preview the trc file, it works and I can see the motion I am expecting. However, I can't upload it (File>Upload Motion), because it's not a .mot file.... I'm not sure what to do. Could you please help?. I have done some of the tutorial, but they all work with files that are already in the expected format, so I'm not sure how to now use my own data.

I would really appreciate any help to get some progress.

Thank you!

User avatar
Thomas Uchida
Posts: 1793
Joined: Wed May 16, 2012 11:40 am

Re: How to upload my own data (having separate files for force and motion)

Post by Thomas Uchida » Tue Aug 01, 2017 11:02 am

There is a section in the Confluence documentation called "Preparing Your Data" (http://simtk-confluence.stanford.edu:80 ... +Your+Data) that might be helpful. See, in particular, the "Marker (.trc) Files" page (http://simtk-confluence.stanford.edu:80 ... c%29+Files).

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: How to upload my own data (having separate files for force and motion)

Post by jimmy d » Tue Aug 01, 2017 11:04 am

Monica, please go through Tutorial 3. This will go through the basic OpenSim workflow through to Inverse Dynamics. I would advise you to look carefully at the input files needed for each of scaling, Inverse Kinematics, and Inverse Dynamics.

You will have to take your data and turn it into OpenSim format. There is information on each data type, and tools to convert c3d files to these data types, here. If you these tools aren't specific to your data type (Matlab Data Types), then you will have to write your own converters.
It seems that it doesn't have markers, do I need to add new markers separately
Yes. You will have to make a marker set for the model that matches your experimental data.
However, I can't upload it (File>Upload Motion), because it's not a .mot file.... I'm not sure what to do.
You have markers, not a motion. You compute a models motion by running an Inverse Kinematics analysis.

User avatar
Monica Armengol
Posts: 8
Joined: Fri Oct 07, 2016 1:58 am

Re: How to upload my own data (having separate files for force and motion)

Post by Monica Armengol » Wed Aug 02, 2017 8:50 am

Hi James and Tom,

Thank you for the information. I have read the tutorials and I modified some of the converter programs to convert my data into trc and mot. I think the files are OK. I think the problem is before that. Is trying to hook my markers into the model.

I've created new virtual markers with new labels according to those I've used in my experiment. Then I scale (Tools> Scale) , following the instructions of the tutorial (upload the static trc file twice). It doesn't through an error, but I can't see the experimental markers and it's impossible they are all overlapped by the ones I choose by hand. I have ticked the preview box in the scale window.

Actually, I tried to do this with an openSim example (3DGaitModel2392) without modifying any of the data, and ticking the "Preview Static Pose" box, and again I can't see the experimental markers.

What could be the problem?. Am I missing a step between loading having the files and being able to scale?

Thanks!

User avatar
jimmy d
Posts: 1375
Joined: Thu Oct 04, 2007 11:51 pm

Re: How to upload my own data (having separate files for force and motion)

Post by jimmy d » Wed Aug 02, 2017 9:15 am

From the documentation;
Checking the box labeled Preview static pose (no marker movement) will display the inverse kinematic solution in a 3D View without any adjustments made to the original model marker locations.
The tool is not going to show the experimental markers. To see the experimental markers, you will need to preview the data (File>Preview Experimental Data..). You can then overlay the scaled model and the data by adjusting the Model offsets.

User avatar
Monica Armengol
Posts: 8
Joined: Fri Oct 07, 2016 1:58 am

Re: How to upload my own data (having separate files for force and motion)

Post by Monica Armengol » Wed Aug 02, 2017 10:14 am

ohh... oK!. I didn't realize that. Thank you very much!

POST REPLY