Page 1 of 1

Externalforce problem using IDtool on MATLAB

Posted: Tue Apr 15, 2014 8:45 am
by yeonghun
Hi,

I'm trying to use IDTool on MATLAB with MATLAB optimization tool.(fmincon)
(To solve some kinds of trajectory optimization problem.)
When I use IDTool and Analyzer tool w/o externalforce,
there are no error on solving problems.
But When I apply external load by using
setExternalloadsFileName('~');
Below error has occured on second iteration.

Code: Select all

Storage: file=id_force1.mot (nr=101 nc=7)
InverseDynamicsTool Failed: ExternalForce: Data source id_force1 specified by name, but  was set.
'id_force1' is the first line of header of external load data file.
(externalload was defined on .xml file, and time-load data was stored on .mot file. and id_force1 is the first line of header of .mot file)

In my problem, I need to run IDTool and Analyzer tool iteratively with same externalload condition.

As this code, I always clear memory after running tool.

Code: Select all

IDTool.run();
    IDTool=[];
how can I solve this error?

Thanks.

Re: Externalforce problem using IDtool on MATLAB

Posted: Sun Apr 27, 2014 9:36 pm
by jimmy
Hi Kim,

Perhaps use the the InverseDynamicsSolver() rather than the tool. Many of the tools were specifically designed to work with the GUI so may be problematic when run in the manner that you are attempting.

If you have the OpenSim source code you will be able to see how the solver is implemented in the tool.

cheers,
-james