Transform trc to mot

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Carlos Ramirez
Posts: 13
Joined: Mon Oct 22, 2012 12:10 pm

Transform trc to mot

Post by Carlos Ramirez » Sun Aug 11, 2013 7:35 am

Hello forum, i am trying to load a .mot file motion into a "Both legs with muscles" model, this mot file was created from a .trc file that i transformed inside opensim but the system tells me "Could not associate motion to current model." after that i try to transform the source .trc file with the "matlab_preprocessing" OpenSim Utilities, but inside matlab i get "Error using transform_trcFile (line 9) unable to open TRC_FILE.trc"
The question is, where do i have to locate the trc file to process into matlab and after that, would it be possible to load the motion into opensim ?
Thanks in advance for any answer that could be helpfull to continue this research.

PS: I have attached the TRC_FILE.trc in this thread

Fis. Carlos Ramirez

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

Re: Transform trc to mot

Post by jimmy d » Mon Aug 12, 2013 10:43 am

Hi Carlos,
Seems that the trc didnt upload. Could you attach the .mot and .trc files ?

-James Dunne

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

Re: Transform trc to mot

Post by Ayman Habib » Mon Aug 12, 2013 11:17 am

Hi Carlos,

The functionality "File->load motion..." in the GUI assumes that you have a motion .mot (or .sto) file that contains coordinate values, I expect trc files to contain only marker trajectories and as such it would not load as a motion (you won't see the model move even if markers do). To visualize trc files you should use the GUI option (File->Preview Experimental Data...) and this will load the the trc file and show the marker cloud and you can inspect the marker locations against time. If you have a loaded motion (e.g. IK solution) that can be associated with the the marker data,then you can use the "associate motion data" functionality, described here:
http://simtk-confluence.stanford.edu:80 ... h+a+Motion

Hope this helps,
-Ayman

User avatar
Carlos Ramirez
Posts: 13
Joined: Mon Oct 22, 2012 12:10 pm

Re: Transform trc to mot

Post by Carlos Ramirez » Tue Aug 13, 2013 10:14 am

Thanks Ayman for your explanations, but what i have it is the trc file that can be see it only in that way "Preview Experimental Data" what i want it is to create a mot file based on this trc file so i can load the motion inside the model.
Here i upload the files again.

Thank you
Carlos
Attachments
move.zip
trc and mot file
(44.09 KiB) Downloaded 98 times

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

Re: Transform trc to mot

Post by Ayman Habib » Tue Aug 13, 2013 11:55 am

Hi Carlos,

The process of finding coordinate values (motion) for the model to match marker locations is precisely the function of the Inverse Kinematics (IK) tool. The tool will solve for a motion that you can then load into the GUI. Please consult the documentation page here:
http://simtk-confluence.stanford.edu:80 ... Kinematics

and let us know if you continue to have questions.

I noticed that your trc file has spaces in marker names which could be problematic downstream, it would be good to fix this issue before moving forward.

Best regards,
-Ayman

User avatar
Carlos Ramirez
Posts: 13
Joined: Mon Oct 22, 2012 12:10 pm

Re: Transform trc to mot

Post by Carlos Ramirez » Sat Aug 17, 2013 7:23 pm

Hello i did what Ayman said and i successfully got the mot file after scaling a model to fit my subject measurement, now i am testing with plot function, the question now is, is it possible to create a custom report to print, containing few charts and data like antropometric´s measurement and gait variables everything together.

Thank you again
Carlos

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

Re: Transform trc to mot

Post by jimmy d » Mon Aug 19, 2013 7:22 am

Hi Carlos,

You can create customized plots in the tools->plots function. A detailed description is linked below.

http://simtk-confluence.stanford.edu:80 ... m/Plotting

cheers,
-james

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

Re: Transform trc to mot

Post by Ayman Habib » Mon Aug 19, 2013 10:16 am

Hi Carlos,

Thanks James.

I'd add that as of today, the plotter creates only one chart/plot with multiple curves. You can export each plot as an image file and then have a custom/template html file that includes these images so you have one report to pass along to others. We have plans to allow for multiple charts and reports but that's still in the planning phase. It would be great if you can provide a feature request describing your use case and what you'd like to see to make sure we address it when we get to implement this functionality.

All the best,
-Ayman

User avatar
Carlos Ramirez
Posts: 13
Joined: Mon Oct 22, 2012 12:10 pm

Re: Transform trc to mot

Post by Carlos Ramirez » Mon Aug 19, 2013 7:01 pm

Hello, about the custom report, it is a good idea to build a html file that can be used as a template to show the images, anyway it would be very helpfull to have it integrated to opensim to get more reliable and faster gait reports.
Would be very nice if you can build different templates according to what you want to analyse.
Charts in different axis, stride length and time, stance phase time, possibility to create events so you can get gait cycle reports. Anthropometric information about subject.
Few things i think they are must.

Thanks

Carlos

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

Re: Transform trc to mot

Post by jimmy d » Fri Aug 23, 2013 9:47 am

Carlos-
If you could make a feature request that would be great. The link to the feature request is below.

cheers,
-james

https://simtk.org/tracker/?atid=323&gro ... unc=browse

POST REPLY