Report marker locations in IK

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Samuel Hybois
Posts: 15
Joined: Mon Nov 02, 2015 3:55 am

Report marker locations in IK

Post by Samuel Hybois » Fri Mar 17, 2017 7:39 am

Hi !
We are using OpenSim for different applications, including wheelchair propulsion and golf swing. We use a custom bilateral model derived from the right-handed scapulothoracic joint model (Seth et al.).
To compute the mean square error for each marker, we add the <report_marker_locations> line on the .xml setup file for inverse kinematics.
For some reason we were not able to identify, the .sto file containing marker locations is written in some cases, and not written in others.

Have some of you experienced such an issue when performing IK?

Thanks a lot for your help!

Sam

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

Re: Report marker locations in IK

Post by jimmy d » Tue Mar 21, 2017 8:07 am

The tools can't print .sto files to folders/directories that don't exist. People with your issue have typically been trying to write the files to custom paths.

User avatar
Samuel Hybois
Posts: 15
Joined: Mon Nov 02, 2015 3:55 am

Re: Report marker locations in IK

Post by Samuel Hybois » Thu Apr 06, 2017 1:21 am

Hi James,
Thanks for your answer!
Actually in our case, the .mot file containing generalized coordinates from IK is written in the directory specified in the .xml setup file, whereas the ik_model_marker_locations.sto files is not written. Could that be something else than a path issue?
I have attached the setup.xml file, if you can take a look..

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<OpenSimDocument Version="20302">
   <InverseKinematicsTool name="golf_022_GB_model_final">
      <results_directory>C:\Users\hybois\Documents\MATLAB_2016_path\TraitementOS_Maxime\V3_mars_2017\data_pretraitees\golf_022_GB\driver</results_directory>
      <input_directory>C:\Users\hybois\Documents\MATLAB_2016_path\TraitementOS_Maxime\V3_mars_2017\data_pretraitees\golf_022_GB\driver</input_directory>
      <model_file>C:\Users\hybois\Documents\MATLAB_2016_path\TraitementOS_Maxime\V3_mars_2017\data_pretraitees\golf_022_GB\modele\golf_022_GB_model_final.osim</model_file>
      <constraint_weight>100</constraint_weight>
      <accuracy>1e-05</accuracy>
      <IKTaskSet file="golf_022_GB_coupdriverfort_09_ik_task.xml"/>
      <marker_file>C:\Users\hybois\Documents\MATLAB_2016_path\TraitementOS_Maxime\V3_mars_2017\data_pretraitees\golf_022_GB\driver\golf_022_GB_coupdriverfort_09.trc</marker_file>
      <coordinate_file>Unassigned</coordinate_file>
      <time_range>2.33 3.81</time_range>
      <report_marker_locations>true</report_marker_locations>
      <report_errors>true</report_errors>
      <output_motion_file>golf_022_GB_coupdriverfort_09_ik.mot</output_motion_file>
   </InverseKinematicsTool>
</OpenSimDocument>
Thanks a lot!

Samuel

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

Re: Report marker locations in IK

Post by jimmy d » Thu Apr 06, 2017 1:32 pm

I can't seem to reproduce your issue. Every time I specify a results directory, ik_model_marker_locations.sto is printed to it. The relevant code in the InverseKinematicsTool looks correct;

Code: Select all

IO::makeDir(getResultsDir());
Storage::printResult(modelMarkerLocations, "ik_model_marker_locations", getResultsDir(), -1, ".sto");
Perhaps try not specifying <results_directory> and give a full path to <output_motion_file>. ik_model_marker_locations.sto will be printed to the home dir and you can copy it over as needed.

Are you doing all of these from the GUI, command line, or Matlab/Python?

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

Re: Report marker locations in IK

Post by jimmy d » Thu Jul 06, 2017 11:41 pm

Sam,

Did you find a solution for this?

-j

POST REPLY