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
Unable to add ground to an opensim model
- Jan Thomas
- Posts: 23
- Joined: Mon Aug 10, 2015 8:39 am
Re: Unable to add ground to an opensim model
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
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
- Nithin Kurup
- Posts: 149
- Joined: Sat Jan 18, 2014 5:13 am
Re: Unable to add ground to an opensim model
Hi Jan,
Jan, try to write all the codes inside the main(). Hope it will solve your problem.
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
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
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Unable to add ground to an opensim model
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
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
- Jan Thomas
- Posts: 23
- Joined: Mon Aug 10, 2015 8:39 am
Re: Unable to add ground to an opensim model
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
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
- Jan Thomas
- Posts: 23
- Joined: Mon Aug 10, 2015 8:39 am
Re: Unable to add ground to an opensim model
Hi,
Thanks for all the help. I have successfully completed the performing simulation part
Regards,
Jan Thomas
Thanks for all the help. I have successfully completed the performing simulation part
Regards,
Jan Thomas
- cui jiashuo
- Posts: 17
- Joined: Thu Dec 06, 2018 6:21 pm
Re: Unable to add ground to an opensim model
Why can't my opensim find the addDisplayGeometry function?
- Mario Garcia
- Posts: 1
- Joined: Tue Dec 25, 2018 11:15 am
Re: Unable to add ground to an opensim model
I had the same doubt...Thanks for solving!!
tecnica vocal
tecnica vocal
- Ayman Habib
- Posts: 2238
- Joined: Fri Apr 01, 2005 12:24 pm
Re: Unable to add ground to an opensim model
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
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