Headers in Matlab generated motion file not working

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
David Walker
Posts: 13
Joined: Tue Jun 02, 2009 9:48 pm

Headers in Matlab generated motion file not working

Post by David Walker » Fri Jul 12, 2013 3:14 pm

Hello all

I generated motion files in matlab and everything seems right visually in excel but when I load in the motionfiles in opensim they load but do not interpret my header file properly. Ayman can you take a look at this
Attachments
Motion_File_Template.txt
(6.63 KiB) Downloaded 30 times
Opensim_Pt04.MOT
motion file
(5.81 KiB) Downloaded 32 times

User avatar
ANDREW LAPRE
Posts: 29
Joined: Tue Dec 04, 2012 11:10 am

Re: Headers in Matlab generated motion file not working

Post by ANDREW LAPRE » Fri Jul 19, 2013 1:49 pm

Try adding a second heading for each of the coordinates only with _u after with data under the heading equal to 0. I had this problem as well.

For example:
time humerus_tx humerus_ty humerus_tz
1 -0.862531 0.00938937 0.0359995
2 -0.862551 0.00997571 0.0357119
3 -0.862575 0.0117628 0.0345251
becomes:
time humerus_tx humerus_ty humerus_tz humerus_tx_u humerus_ty_u humerus_tz_u
1 -0.862531 0.00938937 0.0359995 0 0 0
2 -0.862551 0.00997571 0.0357119 0 0 0
3 -0.862575 0.0117628 0.0345251 0 0 0
Also, check to make sure nColumns in the header agrees with how many you actually have.

Hope this helps,
Andy

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

Re: Headers in Matlab generated motion file not working

Post by Ayman Habib » Fri Jul 19, 2013 2:27 pm

Hi,

The issue with the header is that the key words are case sensitive:
Change:
Version -> version
indegrees -> inDegrees

and it should work.

Best regards,
-Ayman

POST REPLY