OpenSIM transform tool make .trc files corrupt

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
GEORGIY TOKUNOV
Posts: 6
Joined: Fri Feb 15, 2019 11:59 am

OpenSIM transform tool make .trc files corrupt

Post by GEORGIY TOKUNOV » Thu Aug 01, 2019 10:20 am

OpenSIM transform tool make .trc files corrupt

after saving transformed .trc files with marker data OpenSIM throws an error when opening transformed file:

InverseKinematicsTool Failed: Error reading column Labels in file transformed_walking2.trc'. Unexpected number of column labels. Expected = 46. Recieved = 44.
Thrown at trcfileadapter.cpp:125 in extendRead().

Tags:

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

Re: OpenSIM transform tool make .trc files corrupt

Post by jimmy d » Thu Aug 01, 2019 11:48 am

There are some details on the trc file format here. The error message you are getting seems to indicate the NumMarkers property in the trc header is specifying 46 markers but there are only 44 markers worth of data. This type of error typically happens when you edit the number of markers in the data but don't change the NumMarkers property in the header.

User avatar
GEORGIY TOKUNOV
Posts: 6
Joined: Fri Feb 15, 2019 11:59 am

Re: OpenSIM transform tool make .trc files corrupt

Post by GEORGIY TOKUNOV » Fri Aug 02, 2019 6:18 am

I made an experiment.

My original .trc file didn't throw any error

but after i save .trc from this original file using transfrom tool - it throws mentioned above error.

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

Re: OpenSIM transform tool make .trc files corrupt

Post by jimmy d » Fri Aug 02, 2019 8:00 am

What transform tool?

User avatar
GEORGIY TOKUNOV
Posts: 6
Joined: Fri Feb 15, 2019 11:59 am

Re: OpenSIM transform tool make .trc files corrupt

Post by GEORGIY TOKUNOV » Sat Aug 03, 2019 7:22 am

Opensim

File -> Preview Experimental Data... (open .trc file)

right click on experimental data .trc file in Navigator -> Transform

Rotate X/Y or Z

Save as... (transformed .trc file)

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

Re: OpenSIM transform tool make .trc files corrupt

Post by Thomas Uchida » Mon Aug 05, 2019 7:42 am

This is a known issue with the GUI (https://github.com/opensim-org/opensim-gui/issues/1102). You should be able to edit the TRC file, replacing spaces with tabs. Please see the "Marker (.trc) Files" page in the Confluence documentation (https://simtk-confluence.stanford.edu:8 ... c%29+Files) for a description of the required TRC file format.

User avatar
GEORGIY TOKUNOV
Posts: 6
Joined: Fri Feb 15, 2019 11:59 am

Re: OpenSIM transform tool make .trc files corrupt

Post by GEORGIY TOKUNOV » Mon Aug 05, 2019 11:09 am

Thanks, Thomas!

But already solved it by fixing GitHub dvarnai/pyC3D2OSIM python script.

resulting code here:
https://github.com/IISCI/c3d_2_trc

POST REPLY