Page 1 of 1

Error in simulating contacts using API

Posted: Mon Jun 28, 2010 12:21 pm
by priyanshu
Hi,

I am trying to run the "TugofWar6_AddContact.cpp" program provided with the OpenSim Developer's guide. However, when I run the exe generated by compiling the code I get an error "TugofWar1_CreateModel.exe has stopped working".

I'm using the recommended configuration setting "RelWithDebInfo". I have also copied the .obj file and other .vtp files in the same directory in which my model exists. However, all the codes till adding contact provided in the guide were working fine. I'm using the following procedure:

1. Use CMake to generate a visual studio solution file.

2. Load the solution file in Visual C++ 2008 Express Edition.

3. Set the configuration to "RelWithDebInfo" using Build->Configuration Manager.

4. Paste the .obj file in the same directory as .sln file (even in the .cpp file directory).

5. Build the solution (F7) to generate the .exe (Unfortunately compiling the code (Ctrl+F7) doesn't either generate the exe nor update the osim file for me.)

6. Paste the .obj and .vtp files in the same directory as the generated exe.

5. Run the .exe generated.

This is where I get the mentioned error "TugofWar1_CreateModel.exe has stopped working".

Is there anything I'm missing?

Thanks.

Regards,
Priyanshu

RE: Error in simulating contacts using API

Posted: Mon Jun 28, 2010 12:53 pm
by aymanh
Priyanshu,

Were you able to run the examples up to TugofWar6_AddContact? If so, this could be because of Visual Studio version incompatibilities. I'd recommend installing the OpenSim distribution made with Visual Studio 2008 Express which is available on the downloads page under the package "OpenSim release betas". The name of the distribution file is OpenSim-2.0.2-win32-VC9E.exe (for VC9 Express).

Please give it a shot and let me know how it goes.

Cheers,
-Ayman

RE: Error in simulating contacts using API

Posted: Mon Jun 28, 2010 1:42 pm
by priyanshu
Hi Ayman,

Ya it is working fine with this version of OpenSim. Thanks for the help.

Regards,
Priyanshu