Page 1 of 1
Unable to add ground to an opensim model
Posted: Fri Aug 21, 2015 10:49 am
by janthomas15
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
Re: Unable to add ground to an opensim model
Posted: Sun Aug 23, 2015 3:41 am
by janthomas15
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
Re: Unable to add ground to an opensim model
Posted: Mon Aug 24, 2015 2:27 am
by ex10192
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
Re: Unable to add ground to an opensim model
Posted: Mon Aug 24, 2015 10:08 am
by aymanh
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
Re: Unable to add ground to an opensim model
Posted: Thu Aug 27, 2015 4:47 am
by janthomas15
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
Re: Unable to add ground to an opensim model
Posted: Sun Aug 30, 2015 10:25 am
by janthomas15
Hi,
Thanks for all the help. I have successfully completed the performing simulation part
Regards,
Jan Thomas
Re: Unable to add ground to an opensim model
Posted: Mon Dec 24, 2018 6:18 pm
by cjszero
Why can't my opensim find the addDisplayGeometry function?
Re: Unable to add ground to an opensim model
Posted: Tue Dec 25, 2018 11:20 am
by mario85
I had the same doubt...Thanks for solving!!
tecnica vocal
Re: Unable to add ground to an opensim model
Posted: Wed Dec 26, 2018 2:32 pm
by aymanh
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