Inverse Dynamics Point Force nans

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kate Mockler
Posts: 8
Joined: Tue Sep 18, 2018 10:16 am

Inverse Dynamics Point Force nans

Post by Kate Mockler » Wed Mar 06, 2019 7:16 am

Hi all,

Relatively new OpenSim user here. I am trying to work out why my resulting inverse dynamics .sto file has 'nan's in the pelvic force and moments columns. I only have force data for the right foot ie data from one force plate. Is this sufficient to compute inverse dynamics? Or do you need forces for both feet? I inputted the ground reaction force as a point force to the right calcn.

Thank you in advance.
Attachments
Screenshot 2019-03-06 at 14.12.20.png
Screenshot 2019-03-06 at 14.12.20.png (233.13 KiB) Viewed 358 times

User avatar
Kate Mockler
Posts: 8
Joined: Tue Sep 18, 2018 10:16 am

Re: Inverse Dynamics Point Force nans

Post by Kate Mockler » Thu Mar 07, 2019 8:41 am

Just incase anyone has a similar problem, here was my solution:

The problem was with my ground reaction force file (the .mot file from the walking trial, exported via Matlab C3DExport.m). At the end of this file, there were 'nan' values instead of numbers. This caused the inverse dynamics output file to have columns full of 'nan's. To fix this, it was necessary to open each ground reaction force file in a text editor (notepad++, atom, sublime text) and do a find and replace. I replaced all the 'nan's with zero. This fixed the problem with the inverse dynamics output file and eliminated the nans.

Hope this helps!

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

Re: Inverse Dynamics Point Force nans

Post by jimmy d » Mon Mar 11, 2019 1:27 pm

If possible, you can delete the entire row of data that contains NaNs. This may be useful when the NaNs exist in a region that is actually necessary for ID (like during stance). The internal spline doesn't function doesn't require linear time points.

POST REPLY