Labbook IMAV
Started IMAV Labbook 2013.
July 24, 2012
- Added the FFMPEG/.../bin directory to the system PATH. Problem solved, next problem is a runtime error:
July 23, 2012
- Still missing getifaddrs-function, but this was due to fact that the libpgm called this functions pgm_getifaddrs. Also this function was not found, but this was because I made the libpgm function in configuration win32. One error less (libpgm still needs libary for GetAdaptersAddresses). Found function in Iphlpapi.lib.
- Remaining 4 unresolved externals (bswap, clz, ftw, inet_aton).
- Replaced inet_aton for inet_addr (3 unresolved externals).
- Used portable bswap macro from Klocwork. (2 unresolved externals).
- Used the clz-function (should be inline) from Stackoverflow. (1 unresolved external).
- A port of the ftw was according to the MinGW forum not easy to port, so removed the call (only used to free space of onboard recordings).
- Solution links (warning about incompatible default library: Warning 297 warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library C:\svn\ARdroneMap\cpp\ardrone_slam\ardrone_slam\MSVCRTD.lib(cinitexe.obj))
- Running Executable fails about missing codec.dlls (task for tomorrow).
July 21, 2012
- Remaining problem with wiki_config.c is that pgm/atomic.h is loading intrin.h, but instead of VC\include, the one from VP_OS\win32 is loaded. Addding the VC\include at the head of the include list solves this issue.
- Still 6 compilation errors, realted with galois.h and security.h
July 19, 2012
- Continue with the port: 14 errors left (missing functions getifaddrs, ffmpeg_stage_decoding, pave_is_same_frame, ftw, clz, bswap).
- Added video_encapsulation to project, 13 errors left.
- Added video_stage_ffmpeg to project, 11 errors left.
- According to a post, getifaddrs is not trivial to port. Inside the communication multicast protocol this port is made, but this function uses most of the pgm framework (as pgm_error, ...). Downloaded whole package, and following reference guide how to build it for Windows (with CMake).
- Cmake claims that it has build all, but nmake is missing a Makefile. Installing Python 2.7.3 (because OpenPGM requires Python2.7). Not needed, a version of Python2.7 is already installed (but used due to Aldebaran dependencies). What is missing is Perl.
- Opening the solution OpenPGM.sln and make the library from Visual Studio works fine.
- Added the library to the three ardrone_slam projects; still getifaddrs is not found. Included , but this framework includes ws2def.h and winsock2.h, while vp_os.h includes windows.h and windef.h. I need to include vp_com.h (which includes vp_os.h). Should protect both defs from each other.
- Winsock2.h has the protection, so by including the framework at the beginning the issue is solved (only an issue with intrin.h pops up).
July 10, 2012
- For the next error I have to chose between two video decoding libraries. FFMPEG gives an error, but is according to the AR.Drone 2.0 SDK overview the better choice (ITTIAM is highly optimized for ARMv7 processors).
- FFMPEG was given as distribution (yet, for Linux and iPhone only). Downloaded latest 64bits Windows version from zeranoe.
- Compilation goes fine, strange enough I cannot use ARDRoneLib as variable for ardrone_slam (used the whole path). After also defining FFMPEG_SUPPORT for ardronewin32 (and removing some of my own additional defines), I solved video_config linker error (35 unresolved symbols left).
July 9, 2012
- Added several new files to the ARDroneAPI-2.0 project to solve linking errors. Yet new files also give new linking errors, so still 28 errors to go (mainly about ftpFunctions).
- I liked the addition of a missing function to vp_os_signal:
C_RESULT
vp_os_mutex_trylock(vp_os_mutex_t *mutex)
{
int retVal;
#if defined USE_WINDOWS_CONDITION_VARIABLES
retVal = TryEnterCriticalSection((CRITICAL_SECTION *)mutex);
#elif defined USE_PTHREAD_FOR_WIN32
retVal = pthread_mutex_trylock(pthread_mutex_t *)mutex);
#else
#endif
return retVal ? C_FAIL : C_OK;
}
July 5, 2012
- Worked hard yesterday during the opera Dido & Aeneas. Solved most of the problems with intermixed declaration in code (could not find this C99 option in VS and also failed with the compile like C++ option).
- Two remaining problems: unknown video_decoder_config_t in video_stage.h (same four functions, but completely different internal variables). Other problem is packed attribute in video_encapsulation (this is done in several Common/*.h files in 1.8). video_decoder_config is also used in ControlEngine/iPhone/.../opengl_stage.h.
- Problem with the video_decoder was that FFMPEG_SUPPORT or ITTIAM_SUPPORT has to be defined. Replaced it for the moment with a general vlib_stage_decode_config_t.
- Everything compiles (no idea what happened with video_encapsulation, maybe this file is not needed in project. Link error seems to be the inline SUCCEED(res). Same function was already used in v1.8 (vp_com_socket_utils.c).
- ARDroneAPI-2.0 now builds. Also build and run adrone_slam. Need a AR.Drone to test! Time to go home.
- Build still fails on navdata. This is because adronewin32 is not yet build. Solved two issues (ardrone_tool_init with more parameters and video_stage_get no longer available). adronewin32 now builds, solution has now 29 linker errors.
Documentation delivered by API20 is still old, should look at linux and iPhone examples for guidance.
July 4, 2012
- Accicidently upgraded the firmware of the AR.Drone (yes the button on the Android FreeFlight is below the piloting button, and no confirmation is required). Should follow this instructions to downgrade back to Firmware 1.6.6.
- Downloaded Version 2.0 of the SDK. In ardrone_slam are two directories with API-1.7 and API-1.8. Made a directory API-2.0 and copied the vcxproj from 1.8 into 2.0 (and modified all references to 1.8).
- The project-file loads all source-files relative from the ARDroneLibDir, which is defined in solution_properties.props. Changed that one to 2.0.
- Positive news is that the correct files are loaded (ardrone_api.h is still copyright 2010, the first difference is the include of sys/time.h. The bad news is 274 errors.
- Copied the win32_custom.h from the ardrone_slam/...1.8 directory; 283 errors. Removed unistd.h from config_keys; 282 errors. Modified at_mutex.c: 281 errors.
- is not a good replacement of . androne_tool contained no socket-functions in v1.8. 115 winsock errors left.
May 23, 2012
- Camiel asked for help related to a missing OpenCV reference. Looked at the installation at nb-udk. Still 100 errors. First added $(OpenCVDir\build\include) to Additional Include Directories. 14 errors left.
- Added slam_map and slam_feature from the archive Nick mailed. No compilation errors left.
- Building fails (in ARDroneAPI-1.8?) on missing bot_ardrone_3dmouse.cpp. Added those files also from archive. Now I get a complaint about vp_os_thread_dep.h (several available in both ARDroneAPIs). Added $(ARDroneLibDir)\VP_SDK\VP_Os to Additional Include Directories. Now a complaint about hidsdi.h. Added C:\Programs Files (x86)\Windows Kits\8.0\include\shared to Include Directories. This gives many errors (windef.h is now loaded from this Windows Kits). Tried to download sdk from 3D Connexion, but the site went down (and was not necessary according to Nick).
- According to Nick I first have to build the ARDrone.API. In the solution_properties.props the ARDroneLibDir is set C:\Programs (not the local copy). Still, compilation fails on the SDL library. Downloaded v1.2.15 from Lib SDL(64bits version). Also had to download the source for the include files. Put the SDL.dll in bin\win64 directory.
- Still 220 errors: for instance arpa/inet.h and ifaddrs.h could not be found (only available in cygwin-directories). Switch to local ARDroneAPI (which is probably correctly configured for Windows instead of Linux).
- Everything builds now, I could concentrate on linking-errors. Set the OpenCV\Lib to ${OpenCVDir)\build\x64\vc10\lib, added $(SolutionDir)\$(Configuration) for yaml.lib and added Windows Kits\8.0\Lib\Win8\um\x64. Result: 18 Errors (ardronewin32 and terrain3d not loaded)?
- Seems more related with 32 vs 64 bits. Made a 64bits version of yaml. ardrone_slam can now not longer find ardronewin32. Ardronewin32 seems to need ARDroneAPI.lib.
- Still 18 errors, but now all related with 32bits version of D3DX. Switched from DirectX SDK to Windows Kits. Added d3d9.lib, d3dx9.lib, dinput8.lib, dxguid.lib to LinkerInput->AdditionalDependences. adrone_slam.exe is build.
- Running adrone_slam fails because opencv dlls are not in my path. Next missing dll is tbb_debug (grep on opencv_haartraining_engined.lib shows that this is the source). Switched using the opencv libraries from debug to release. That works, next complaint is d3dx9_44.dll. Added Windows Kits to System->Path, but the file is not there. The earlier versions (d3dx9_43.dll, d3dx9_42.dll, etc) are everywhere.
- According to Microsoft, I am in trouble. The DLL (#44) is referenced in the Windows 8 SDK Developer Preview, but depreciated (because Windows 8 developers should use Direct3D 11).
- Switched back to DirectX SDK (June 2010). Rebuild ardrone_slam and terrain3d (still #44).
- When I am deleting all references to the Windows Kit, hidsdi.h could not longer be found. Made move forwards, and downloaded the consumer preview of the Windows Software Development Kit. (Renamed the old version (developer preview) 8.0preview).
- OK, now ardrone_slam.exe runs.
Related Labbooks