Page 1 of 1

Error when using Matlab API

Posted: Tue Jan 14, 2020 5:39 am
by mritula
Hi,
I am trying to run IK tool through Matlab. I was able to use this successfully in the past. I downgraded Opensim 4.0 to Opensim 3.3 and upgraded it back to Opensim 4.0. But now I started getting errors as below when I try to run IK as follows. Kindly help me with this.

...
iktool = InverseKinematicsTool(IK_Setup_File);
iktool.run();


Errors:
Error using Running_IK (line 71)
Java exception occurred:
java.io.IOException: InverseKinematicsTool Failed, please see messages window for details...

at org.opensim.modeling.opensimActuatorsAnalysesToolsJNI.InverseKinematicsTool_run(Native
Method)

at org.opensim.modeling.InverseKinematicsTool.run(InverseKinematicsTool.java:137)

Thanks,
Mritula

Re: Error when using Matlab API

Posted: Tue Jan 14, 2020 11:17 am
by aymanh
Hi Mritula,

There're many reasons why the tool would fail (missing or badly formatted files, inconsistent tasks, weights, flags, etc.) do you get any indication when running from the GUI? There were multiple bug fixes to the IK tool in version 4.0 and the underlying model structure was significantly changed, it's a bit hard to help you out with no relevant details.

Best regards,
-Ayman

Re: Error when using Matlab API

Posted: Thu Jan 16, 2020 3:49 am
by mritula
Hi Ayman,
Could you let me know what further details you need? I can run successfully in GUI.

Please find below the entire error, Sorry I missed the first line then
InverseKinematicsTool Failed: Object: Cannot open file \. It may not exist or you do not have permission to read it.
Thrown at object.cpp:105 in Object().
Java exception occurred:
java.io.IOException: InverseKinematicsTool Failed, please see messages window for details...

at org.opensim.modeling.opensimActuatorsAnalysesToolsJNI.InverseKinematicsTool_run(Native
Method)

at org.opensim.modeling.InverseKinematicsTool.run(InverseKinematicsTool.java:137)

Re: Error when using Matlab API

Posted: Sat Jan 18, 2020 5:11 am
by mritula
Hi Ayman,
Thanks, for the help. I found out the error, it was with reading the trc files location which was mentioned inside the setup file.

Thanks
Mritula