Open david781 opened 11 years ago
I have tried to integrate it in Visual Studio 2010 as mentioned in the manual but it is giving lots of errors.
Hi David,
About OpenCV, you need to get and install the library, and then modify the Makefile (or the VS project) to link the controller with OpenCV. Finally, the camera values have to be sent to OpenCV. I'm unfortunately not expert in OpenCV, and I can't explain you how to do that.
About VS, I think that the doc is quite well done. Probably the issue you encounter, and which is not explained in the documentation, is that the DARwIn-OP controllers are linked with internal libraries (managers.dll for example). You have probably to deal with this.
Sending us the error messages would be helpful.
Sincerely, Fabien
Note that OpenCV is released in Webots inside the Aldebaran-Nao package: resources/projects/robots/nao/aldebaran/naoqi-runtime/lib/
Even no need to install it ^^
Regading Integration between VS10 and WEBOTS.
I am receiving following errors
Error 2 error LNK2019: unresolved external symbol "public: void thiscall Robot::Walking::LoadINISettings(class minIni *)" (?LoadINISettings@Walking@Robot@@QAEXPAVminIni@@@Z) referenced in function "public: thiscall managers::DARwInOPGaitManager::DARwInOPGaitManager(class webots::Robot ,class std::basic_string<char,struct std::char_traits
I have used the demo code of "visual tracking" present in webots
Hi David,
This is a linking error.
Let's take only the first line: unresolved external symbol "public: void __thiscall Robot::Walking::LoadINISettings(class minIni *)"
This function is defined in the Robotis framework: WEBOTS/resources/projects/robots/darwin-op/libraries/darwin/darwin/Framework/include/Walking.h
So this means that the Robotis shared library (WEBOTS/resources/projects/robots/darwin-op/libraries/darwin/darwin.dll) is not linked with your project.
Sincerely, Fabien Rohrer
Hi,
I have tried to link the "darwin.dll" file to the VC++ code but was unable to do so. Can you guide me how to link this process. Now I am only trying to integrate webots and darwin-op in VC++.
Regards, David.
Now the error is:
VisualTracking.obj : error LNK2019: unresolved external symbol "public: thiscall managers::DARwInOPVisionManager::DARwInOPVisionManager(int,int,int,int,int,int,int,int)" (??0DARwInOPVisionManager@managers@@QAE@HHHHHHHH@Z) referenced in function "public: thiscall webots::VisualTracking::VisualTracking(void)" (??0VisualTracking@webots@@QAE@XZ) 1>VisualTracking.obj : error LNK2019: unresolved external symbol "public: bool __thiscall managers::DARwInOPVisionManager::getBallCenter(double &,double &,unsigned char const *)" (?getBallCenter@DARwInOPVisionManager@managers@@QAE_NAAN0PBE@Z) referenced in function "public: void __thiscall webots::VisualTracking::run(void)" (?run@VisualTracking@webots@@QAEXXZ) 1>darwin-VS.exe : fatal error LNK1120: 2 unresolved externals
darwin.dll is a C++ library generated from gcc. Therefore it won't link / integrate with Visual C++. You should either:
1) use gcc 2) recompile darwin.dll with Visual C++
-Olivier
Please refer to http://www.cyberbotics.com/forum?message=2293 and please, next time, use only one thread :-)
I experienced the same thing as david781. there's 2 unresolved externals.. i'm using "visual tracking" demo code... is there any solution?
Hello Fabien and Oliver, I experienced the same thing as david781, nelson, there's 2 unresolved externals... I have tried to recompile the dll file into lib file, after including the darwin.lib there occurred a lots of errors. Some of them referring to the libraries of Linux. But this libraries are not included in windows system with VS. Is there any solution? Does anyone succeeded in the following issue? If yes, please, share your solutions.
Hi everyone I've experienced a similar situation not too long ago. On my Windows PC I upgraded the Msys from 4.6 to 4.8 and it solved the problem. Maybe Msys is a much better alternative than VS (my opinion).
Hello darwinop,
Would you please tell more details about your configurations and which installers you have been using?
I tried to use x86_64-w64-mingw32 and it failed, as well as standard mingw library: Here are some errors which it gave me:
../VisualTracking.cpp:25: undefined reference to webots::Robot::Robot()' ../VisualTracking.cpp:27: undefined reference to
webots::Robot::getBasicTimeStep() const'
../VisualTracking.cpp:29: undefined reference to `webots::Robot::getLED(std::string const&)'
and etc further more of undefined references,
This was my build command: g++ "-LC:\Program Files (x86)\Webots\resources\projects\robots\darwin-op\libraries\darwin" "-LC:\Program Files (x86)\Webots\lib" "-LC:\Program Files (x86)\Webots\resources\projects\robots\darwin-op\libraries\managers" -o NewCotroller.exe main.o VisualTracking.o -ldarwin -lController -lmanagers
Thank you in advance!
hi arasalt I originally had MinGW 4.6.2 and it was a simple matter of letting it update automatically. I wished I remembered the settings because I am now experiencing some issues
Recently my Windows PC crashed and I needed to do factory reset so naturally I had to reinstall MinGW. After recovery I have been experiencing the errors similar you have posted.
By the way are you getting some "Error 127"?
No, I am not. What it tells you? I wish someone could explain those errors. I am being stacked at this problem for almost for a week... Have tried many different ways. My initial purpose was to combine Darwin-op with opencv either through VS or mingw.
Hi arasalt I will keep working on this error but progress may be slower than you wished. I got other things going on that are of higher priority. If there is anything that may be of help I will post it here.
Hi,
Actually Webots comes with the right version of mingw in its Webots/mingw folder. This MinGW binary package includes a 32 bit MinGW-builds (gcc 4.8.0, dwarf exception handing, posix threading) toolchain. Sources are available from the MinGW-builds project or from download.qt-project.org. You need this one to be able to recompile the DARwIn-OP controller programs.
I was able to recompile the the darwin.dll and managers.dll libraries in Windows. maybe this method can help.
I was very fortunate I was able to find an earlier installation file of MinGW (can provide upon request). this one is much simpler than the newer installation method. 1) I installed older MinGW "offilne" method. 2) Ran newer version of MinGW. 3) simply updated the packages
PLease let me know if this helps.
@ arasalt
Please look at my previous post. In reference to Dr. Olivier's comments about expection handling and posix I think these are optional and can be installed with the newer installation file of MinGW.
You can download the mingw we use in Webots from here: http://download.qt-project.org/development_releases/prebuilt/mingw_32/x32-4.8.0-release-posix-dwarf-rev2.7z This one was used to successfully compile the DARwIn-OP libraries on Windows.
Thank you everyone! Yesterday I finally successfully compiled the visual_tracking controller of the darwin with the latest MinGW from their main site! I have build my controller on Eclipse with the latest CDT plugin for C++ developers http://www.eclipse.org/cdt/downloads.php. I created a new Makefile project from existing source so that it was able to compile it with exiting references, if anyone wants to add any libraries he has to change the Makefile and reload the project again. However I had a problem with switching my new controller with on existing world, the Webots tells me that I don't have permission for that. Which of the webots version should be purchased in order to do that task. Would Webots edu be enough?
hi arasalt
Its best if you copy your world outside of WEBOTS_HOME (i.s. inside My Documents). Remember that WEBOTS_HOME is: C:\Program Files\Webots (win32) C:\Program Files (x86)\Webots (win64) /Applications/webots (mac) /usr/bin/webots (linux)
is your robot a "Robot" or "Supervisor"? Please refer to the Webots guide if your robot is indeed a "Robot" then the EDU license is enough. A "Supervisor" will require a PRO license. DARWIN-OP model is under Robot so it should not be an issue.
Yes, I can confirm that Webots EDU is enough to fully program the simulated DARwIn-OP robot model (and possibly modify it).
I want to integrate opencv and webots for extracting and processing images acquired from Darwin-OP camera. I need help regarding this issue.