Page 1 of 1

New User Problem with Inverse Dynamics and NaN's

Posted: Mon Feb 18, 2019 2:25 pm
by syretted
Hi there!

Relatively new user here, so hopefully I'm not missing something obvious. I am importing C3D files into OpenSim using the provided MatLab code. For static data or parts of motion where both feet are in contact with the ground, I have no issue. However, I am having trouble with using the .mot file as external loads for inverse dynamics during a normal walking task.
The data I am using has the subject walking in a normal, reciprocal pattern with each foot on a separate force plate. Therefore, when I export the data from Visual 3D, the px, py, and pz columns are blank for the time that the subject's foot is not in contact with the ground (which makes sense). MatLab will write these as NaN values into the .mot file. If I then try to use inverse dynamics using this file and make the external forces point forces, all of the values in ID output are returned as NaN's and I get no data. I am able to switch the forces to body force, which eliminates the problem. I didn't know if that would impact my data too much.
Is there another work around that someone knows about? Some way to interpolate the force positional data? I noticed that for the gait2354 walking data for the ID tutorial, the px, py, and pz values are still present even when the forces are 0 in all planes, which means someone has figured out something.

I'd be happy to attach any data files needed to answer the question better.

Thanks for your help!

Dan

Re: New User Problem with Inverse Dynamics and NaN's

Posted: Thu Feb 21, 2019 11:00 am
by katemockler
I am also wondering the same thing!