Page 1 of 1

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

Posted: Tue Aug 01, 2017 10:45 am
by moniquiu
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!

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

Posted: Tue Aug 01, 2017 11:02 am
by tkuchida
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).

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

Posted: Tue Aug 01, 2017 11:04 am
by jimmy
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.

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

Posted: Wed Aug 02, 2017 8:50 am
by moniquiu
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!

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

Posted: Wed Aug 02, 2017 9:15 am
by jimmy
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.

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

Posted: Wed Aug 02, 2017 10:14 am
by moniquiu
ohh... oK!. I didn't realize that. Thank you very much!