Unable to add ground to an opensim model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Unable to add ground to an opensim model

Post by Jan Thomas » Fri Aug 21, 2015 10:49 am

Hi,
I'm new to opensim, I have been following the developers guide ,some how I can't get past exercise 2 I.e adding ground to the opensim model could anyone help me out with a step by step procedure of how to add the ground. Thank you

User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Re: Unable to add ground to an opensim model

Post by Jan Thomas » Sun Aug 23, 2015 3:41 am

Hi,
In the step 2 of performing the simulation Part 1(Developer's guide) ie: add ground to the model, I tried to compile and run the code in VS2010. but I get error in the the following

ground.addDisplayGeometry("ground.vtp");
ground.addDisplayGeometry("anchor1.vtp");
ground.addDisplayGeometry("anchor2.vtp");

that reads Error: this declaration has no storage class or type specifier.
can someone please help me with this. I am also new to opensim, c++ and cmake and have been trying to learn them all at once.

regards,
Jan
Attachments
error vs2010.png

User avatar
Nithin Kurup
Posts: 149
Joined: Sat Jan 18, 2014 5:13 am

Re: Unable to add ground to an opensim model

Post by Nithin Kurup » Mon Aug 24, 2015 2:27 am

Hi Jan,

Jan, try to write all the codes inside the main(). Hope it will solve your problem.

Code: Select all

 int main(){
 try{
    // Put all the codes btwn these braces.
}
    catch (const std::exception& ex)
    {
        std::cout << ex.what() << std::endl;
        return 1;
    }

	system ("pause");
	return 0;
}


PS. Also try to include your geometry file folder, along with your .osim file inside the release folder( where the .exe file is present) .

All the best,

Nithin

User avatar
Ayman Habib
Posts: 2236
Joined: Fri Apr 01, 2005 12:24 pm

Re: Unable to add ground to an opensim model

Post by Ayman Habib » Mon Aug 24, 2015 10:08 am

Hi Jan,

Looking at your screen capture, the problem code has been written outside the function main's opening/closing braces and so the variables are undefined.

Please consult the file
sdk\APIExamples\ExampleMain\OutputReference\TugOfWar_Complete.cpp under the distribution for a completed example.

Best of luck,
-Ayman

User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Re: Unable to add ground to an opensim model

Post by Jan Thomas » Thu Aug 27, 2015 4:47 am

Hi,
Thanks for the reply! it was very helpful. However I still get couple of errors on compilation, which reads the following:


'exampleMain.exe' (Win32): Loaded 'C:\work station\ExampleMain\build\RelWithDebInfo\exampleMain.exe'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimSimulation.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimActuators.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimCommon.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimAnalyses.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimTools.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp120.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\osimLepton.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\SimTKcommon.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\SimTKmath.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\SimTKsimbody.dll'. Symbols loaded.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\liblapack.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\pthreadVC2.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\libblas.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\libgcc_s_dw2-1.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\libgfortran-3.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wsock32.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\projects\opensim 3x\install\OpenSim 3.3\bin\libquadmath-0.dll'. Module was built without symbols.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Loaded 'C:\Program Files (x86)\K7 Computing\K7TSecurity\K7Crvr.dll'. Cannot find or open the PDB file.
'exampleMain.exe' (Win32): Unloaded 'C:\Program Files (x86)\K7 Computing\K7TSecurity\K7Crvr.dll'
The thread 0x75c has exited with code -1073741510 (0xc000013a).
The program '[3052] exampleMain.exe' has exited with code -1073741510 (0xc000013a).


Could you please help me with this as well,
thanks again!

Best regards,
Jan

User avatar
Jan Thomas
Posts: 23
Joined: Mon Aug 10, 2015 8:39 am

Re: Unable to add ground to an opensim model

Post by Jan Thomas » Sun Aug 30, 2015 10:25 am

Hi,
Thanks for all the help. I have successfully completed the performing simulation part


Regards,
Jan Thomas

User avatar
cui jiashuo
Posts: 17
Joined: Thu Dec 06, 2018 6:21 pm

Re: Unable to add ground to an opensim model

Post by cui jiashuo » Mon Dec 24, 2018 6:18 pm

Why can't my opensim find the addDisplayGeometry function?

User avatar
Mario Garcia
Posts: 1
Joined: Tue Dec 25, 2018 11:15 am

Re: Unable to add ground to an opensim model

Post by Mario Garcia » Tue Dec 25, 2018 11:20 am

I had the same doubt...Thanks for solving!!
tecnica vocal

User avatar
Ayman Habib
Posts: 2236
Joined: Fri Apr 01, 2005 12:24 pm

Re: Unable to add ground to an opensim model

Post by Ayman Habib » Wed Dec 26, 2018 2:32 pm

Hello,

The method has been removed in version 4.0, please refer to the CPP examples under the OpenSim 4.0 distributed resources for the new call sequence to add/attach Geometry.

Best regards,
-Ayman

POST REPLY