Page 1 of 1

TugOfWar example debug error

Posted: Mon Jun 27, 2011 6:49 am
by nataliakosterina
Hi!

I try to create an OpenSim model using existing API example TugOfWar. I run CMake and try to compile the solution with "RelWithDebInfo" configuration settings. Then I tried different scenarios:
1) I accept building two projects: "copyRequiredFiles" and "Example Main". Then a window appears requesting "Executable file name". "regsvr32.exe" -> debugging information could not be found
2) Set "ExmapleMain" as StartUp project, build, accept building two projects: "copyRequiredFiles". Then compilation is completed with 3 succeded. But LINK: C:\...\TugOfWar1_CreateModel.exe not found or not built by the last incremental link; performing full link
3) I tried to change the target in CMakeList.txt (1_CreateModel -> Complete)

I have not got the message "OpenSim example completed successfully".

Could you please point what am I doing wrong,
Natalia

RE: TugOfWar example debug error

Posted: Mon Jun 27, 2011 6:23 pm
by aymanh
Hi Natalia,

The issues you're dealing with are related to VisualStudio rather than the example/code itself. In VisualStudio you need to have a startup project that builds an executable (.exe) and you may also need to specify a working directory for this executable to run in. Please make the project that builds the ExampleMain (startup project) and then run it. If it runs to completion with exit code 0 then it succeeded. Where are you getting the source/CMake files, where are you getting the instructions and what version of OpenSim and/or Visual Studio are you using?

Please let us know so we can help you out.

Good luck,
-Ayman

RE: TugOfWar example debug error

Posted: Tue Jun 28, 2011 2:11 am
by nataliakosterina
Thanks for the answer. The program "TugOfWar_CreateModel.exe" has exited with code0. But *.vtp and *.obj files are empty.

I use CMake 2.6, Visual Studio 2005 v.8.0
The source files are from OpenSim 2.2.1 (I also tried OpenSim 2.0)

Hope for your help,
Natalia

RE: TugOfWar example debug error

Posted: Thu Jun 30, 2011 3:25 am
by nataliakosterina
Dear Ayman,

I do not think the compilation completed successfully because *.vtp and *.obj files are empty. Could you please answer how to fix this problem?

Thanks,
Natalia

RE: TugOfWar example debug error

Posted: Fri Jul 01, 2011 6:27 am
by aymanh
Hi Natalia,

The vtp files and the obj files are not outputs of the program, instead they're geometry files that are used by the model. The vtp files are used for visualization only and the .obj file is for contact/collision purposes. The .obj file should be in the same directory as the model file so that it's found by the code. Please set the working directory inside Visual Studio to a specific directory you know and check that the .osim file gets created?

If you compile RelWithDebInfo you should be able to put break points and see whether the code runs to completion.

Please let us know how that goes,
-Ayman

Re: TugOfWar example debug error

Posted: Mon Sep 12, 2011 2:45 am
by nataliakosterina
Dear Ayman,

thanks for your advices. I can compile the code now, generate and test a modified model.

I would like to test a modified muscle model on a large model, for example Gait2354. Are the source files (*.cpp) available? If so, then where?

All the best,
Natalia