Hi,
I have a problem with the Inverse Kinematics Tool.
I tried to implement the Tool in a Matlab function, but I obtained this error:
"InverseKinematicsTool Failed: Timestamp at row 1 with value -0.004600 is less-than/equal to timestamp at row 0 with value 0.010000 Thrown at TimeSeriesTable.h:486 in validateRow()."
The section of Matlab function, where I implement this Tool, is:
myModel = Model([modelDir '\' name '_muscle_scaled.osim']);
myState = myModel.initSystem();
Model_IK = convertCharsToStrings([modelDir '\' name '_muscle_scaled.osim']);
IK = setup_InverseKinematics('ModelFile', Model_IK, 'MarkerFile', [name '_MarkerPosition.trc'], ...
'data', acq);
ikTool = InverseKinematicsTool([subjectDir '\' name '_SetUp_InverseKinematics.xml']);
ikTool.setModel(myModel);
ikTool.setMarkerDataFileName([modelDir '\' name '_MarkerPosition.trc']);
ikTool.setStartTime(initial_time);
ikTool.setEndTime(final_time);
ikTool.setOutputMotionFileName([modelDir '\ResultsIK\' name '_ik.mot']);
ikTool.run();
If I implement the Tool in a Matlab main script, it works fine.
Do you know why there is a problem with a Matlab function?
Thanks in advance for the help,
Maria Cristina
Inverse Kinematics Tool failed in a Matlab function
- Maria Cristina Panettieri
- Posts: 8
- Joined: Sat Nov 09, 2019 1:42 am