Externalforce problem using IDtool on MATLAB

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
YeongHun Kim
Posts: 6
Joined: Sun Apr 04, 2010 11:47 pm

Externalforce problem using IDtool on MATLAB

Post by YeongHun Kim » Tue Apr 15, 2014 8:45 am

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.

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

Re: Externalforce problem using IDtool on MATLAB

Post by jimmy d » Sun Apr 27, 2014 9:36 pm

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

POST REPLY