Page 1 of 1

Problem about runing tools using command line

Posted: Mon Feb 27, 2012 2:18 am
by sjtuljw520
when I study the OpenSim_DevelopersGuide_24.pdf(in the chapter 3 Page 45)

in the step3. Run InverseDynamics using the command:
analyze –S arm26_Setup_InverseDynamics.xml
but occured the error below:

E:\project\NeuralControl\Development\OpenSimTesting\TestPlugin>analyze -S arm26_
Setup_InverseDynamics.xml
-------------------------------------------------------
This program includes software developed by the
Apache Software Foundation (http://www.apache.org/).
-------------------------------------------------------

Constructing tool from setup file arm26_Setup_InverseDynamics.xml.

AbstractTool arm26 loading model 'arm26.osim'
Loaded model arm26 from file arm26.osim
-----------------------------------------------------------------------
Loaded library
-----------------------------------------------------------------------
-----------------------------------------------------------------------

No external loads will be applied (external loads file not specified).

Loading coordinates from file arm26_InverseKinematics.mot.
Storage: file=arm26_InverseKinematics.mot (nr=121 nc=3)


Low-pass filtering coordinates data with a cutoff frequency of 6...

Found 241 state vectors with time stamps ranging from -0.5 to 1.5.

Exception:
AnalysisTool.run: ERROR- no analyses have been set.
file= ..\..\..\..\src\OpenSim\OpenSim\Tools\AnalyzeTool.cpp
line= 521


Exception:
AnalysisTool.run: ERROR- no analyses have been set.
file= ..\..\..\..\src\OpenSim\OpenSim\Tools\AnalyzeTool.cpp
line= 547

Can anyone please help me? Thanks a lot!


Jianwei

Re: Problem about runing tools using command line

Posted: Mon Feb 27, 2012 10:26 am
by aymanh
Hi Jianwei,

Thanks for the find. The guide is out of date on this as InverseDynamics has been moved to its own executable/tool (rather than an analysis run by the analyze tool as it used to be). Please use "id" instead of "analyze" on the command line and let me know how it goes. We'll update the documentation in the next release but please file a bug report with reference to the section in question so it doesn't fall through the cracks.

Thanks much and best regards,
-Ayman

Re: Problem about runing tools using command line

Posted: Mon Feb 27, 2012 7:34 pm
by sjtuljw520
Thanks Aymanh!

It works now by using your suggest. But there is other problems in the following steps:(Page 45)

4. Modify the setup file arm26_Setup_InverseDynamics.xml by adding the tags
for the analysis you created directly below the </InverseDynamics> tag.

5. Save the new setup file as arm26_myAnalysis_ID.xml

6. Make sure your dll is either in the PATH or that you have copied it to the test
directory. Then, run the tool again from the command line:
analyze –S arm26_myAnalysis_ID.xml –L myAnalysisPlugin

In the file arm26_Setup_InverseDynamics.xml I can not find any tag like </InverseDynamics>

Can you please explain these in detail? thanks a lot!

Best regards

Jianwei

Re: Problem about runing tools using command line

Posted: Mon Feb 27, 2012 7:53 pm
by sjtuljw520
Attachment is the error file in the 1st post.

Re: Problem about runing tools using command line

Posted: Fri Mar 02, 2012 11:03 am
by aymanh
Hi,

As I indicated in my previous message, InverseDynamics is now its own tool and as such you can't run analyses along with it. Get a setup file for the AnalyzeTool and use it instead along with the executable analyze.exe if you want to tack on your own analyses. Please let me know if you need help with this.

Best regards,
-Ayman

Re: Problem about runing tools using command line

Posted: Fri Aug 17, 2012 2:46 pm
by bradh
Similar type problem... I remove the <InverseDynamicsTool> Section from the file and use the command:

analyze -S arm26_myAnalysis_ID2.xml -L MyAnalysis

I get:

-------------------------------------------------------
This program includes software developed by the
Apache Software Foundation (http://www.apache.org/).
-------------------------------------------------------

Loaded library MyAnalysis
Constructing tool from setup file arm26_myAnalysis_ID2.xml.

AbstractTool loading model 'arm26.osim'
Loaded model arm26 from file arm26.osim
-----------------------------------------------------------------------
Loaded library
-----------------------------------------------------------------------
-----------------------------------------------------------------------

No external loads will be applied (external loads file not specified).

Loading coordinates from file arm26_InverseKinematics.mot.
Storage: file=arm26_InverseKinematics.mot (nr=121 nc=3)
Found 121 state vectors with time stamps ranging from 0 to 1.

Exception:
AnalysisTool.run: ERROR- no analyses have been set.
file= ..\..\..\..\src\OpenSim\OpenSim\Tools\AnalyzeTool.cpp
line= 521

Exception:
AnalysisTool.run: ERROR- no analyses have been set.
file= ..\..\..\..\src\OpenSim\OpenSim\Tools\AnalyzeTool.cpp
line= 547

The setup xml file is attached. Could you maybe point me to a good Analysis File Example?