読者です 読者をやめる 読者になる 読者になる

RTAB-Map インストール メモ(Windows10)

Windows 10

無理っぽいので諦めてUbuntu
http://kubotti.hatenablog.com/entry/2016/05/12/153414

エラー1

解凍してできる、
RTABMap-0.11.2-win64\bin\RTABMap.exe
を実行。
zlib.dllがないというメッセージが表示される。

zlib Home Site
環境変数Pathに
;C:\Program Files\zlib\bin
を追加。

INI file doesn't exist...
The configuration file  
"C:\Users\xxxx\.rtabmap\rtabmap.ini" does not exist, it will be created with default parameters.

C:\Users\kubotti_xxxx.rtabmap
的なフォルダが作成された。

RTAB-Map needs a working directory to put the database.
By default, the directory "C:\Users\xxx\Documents\RTAB-Map" is used.

エラー2

[ERROR] (2016-05-09 00:46:17) CameraRGBD.cpp:1286::rtabmap::CameraFreenect2::init() CameraFreenect2: no device connected or failure opening the default one! Note that rtabmap should link on libusb of libfreenect2. Tip, before starting rtabmap: "$ export LD_LIBRARY_PATH=~/libfreenect2/depends/libusb/lib:$LD_LIBRARY_PATH"

libfreenect2というものが必要らしい。

libfreenect2

https://github.com/OpenKinect/libfreenect2

TortoiseGitをインストールしたときのgit bashから

$ cd depends
$ cmd "/C install_libusb_vs2015.cmd"
C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rem This can only be run in a Git Shell or similar environments

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rem with access to git.exe and msbuild.exe.

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rmdir /s /q libusb_src libusb
▒w▒肳▒ꂽ▒t▒@▒C▒▒▒▒▒▒▒▒▒▒܂▒▒▒B
▒w▒肳▒ꂽ▒t▒@▒C▒▒▒▒▒▒▒▒▒▒܂▒▒▒B

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>git clone https://github.com/libusb/libusb.git libusb_src   || exit /b
Cloning into 'libusb_src'...
remote: Counting objects: 11605, done.
remote: Total 11605 (delta 0), reused 0 (delta 0), pack-reused 11605
Receiving objects: 100% (11605/11605), 2.78 MiB | 1.55 MiB/s, done.
Resolving deltas: 100% (8461/8461), done.
Checking connectivity... done.

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>cd libusb_src

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git remote add xlz https://github.com/xlz/libusb.git

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git fetch xlz   || exit /b
remote: Counting objects: 21, done.
remote: Total 21 (delta 18), reused 18 (delta 18), pack-reused 3
Unpacking objects: 100% (21/21), done.
From https://github.com/xlz/libusb
 * [new branch]      master     -> xlz/master
 * [new branch]      winiso     -> xlz/winiso
 * [new branch]      zerocopy   -> xlz/zerocopy

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git merge xlz/winiso
Auto-merging libusb/os/windows_winusb.h
Auto-merging libusb/os/windows_winusb.c
Merge made by the 'recursive' strategy.
 libusb/os/windows_winusb.c | 132 ++++++++++++++++++++++++++++++++++++++++++++-
 libusb/os/windows_winusb.h |  57 ++++++++++++++++++++
 2 files changed, 188 insertions(+), 1 deletion(-)

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set CONFIG=Release

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set YEAR=2015

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" msvc\libusb_dll_2015.vcxproj /p:Platform=x64 /p:Configuration=Release /target:Rebuild   || exit /b
Microsoft (R) Build Engine ▒o▒[▒W▒▒▒▒ 14.0.25123.0
Copyright (C) Microsoft Corporation. All rights reserved.

2016/05/09 1:08:23 ▒Ƀr▒▒▒h▒▒▒J▒n▒▒▒܂▒▒▒▒B
▒m▒[▒h 1 ▒▒̃v▒▒▒W▒F▒N▒g "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g)▒B
CoreClean:
  ▒f▒B▒▒▒N▒g▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
PrepareForBuild:
  ▒f▒B▒▒▒N▒g▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\libusb-1.0 (dll).tlog\" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
InitializeBuildStatus:
  "AlwaysCreate" ▒▒▒w▒肳▒ꂽ▒▒▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\libusb-1.0 (dll).tlog\unsuccessfulbuild" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\CL.exe /c /I. /I..\libusb /Zi /nologo /W4 /WX- /O2 /GL /D _WIN32 /D _WIN64 /D _LIB /D _CRT_SECURE_NO_WARNINGS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\\" /Fd"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\vc140.pdb" /Gd /TC /errorReport:queue ..\libusb\core.c ..\libusb\descriptor.c ..\libusb\hotplug.c ..\libusb\io.c ..\libusb\os\poll_windows.c ..\libusb\strerror.c ..\libusb\sync.c ..\libusb\os\threads_windows.c ..\libusb\os\windows_nt_common.c ..\libusb\os\windows_winusb.c
  core.c
C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  descriptor.c
C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  hotplug.c
C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  io.c
..\libusb\io.c(24): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'assert.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  poll_windows.c
C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  strerror.c
..\libusb\strerror.c : warning C4819: ▒t▒@▒C▒▒▒́A▒▒▒݂̃R▒[▒h ▒y▒[▒W (932) ▒ŕ\▒▒▒ł▒▒Ȃ▒▒▒▒▒▒▒▒܂▒ł▒▒܂▒▒B▒f▒[▒^▒̑▒▒▒▒▒h▒▒▒▒▒߂ɁA▒t▒@▒C▒▒▒▒ Unicode ▒`▒▒▒ŕۑ▒▒▒▒Ă▒▒▒▒▒▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
..\libusb\strerror.c(22): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'locale.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  sync.c
C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  threads_windows.c
C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h(160): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'excpt.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  windows_nt_common.c
..\libusb\os\windows_nt_common.c(28): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'process.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  windows_winusb.c
C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h(160): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'excpt.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
▒v▒▒▒W▒F▒N▒g "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) ▒̃r▒▒▒h▒▒▒I▒▒▒▒▒܂▒▒▒ -- ▒▒▒s▒B

▒r▒▒▒h▒Ɏ▒▒s▒▒▒܂▒▒▒▒B

"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) (1) ->
(ClCompile ▒^▒[▒Q▒b▒g) ->
  ..\libusb\strerror.c : warning C4819: ▒t▒@▒C▒▒▒́A▒▒▒݂̃R▒[▒h ▒y▒[▒W (932) ▒ŕ\▒▒▒ł▒▒Ȃ▒▒▒▒▒▒▒▒܂▒ł▒▒܂▒▒B▒f▒[▒^▒̑▒▒▒▒▒h▒▒▒▒▒߂ɁA▒t▒@▒C▒▒▒▒ Unicode ▒`▒▒▒ŕۑ▒▒▒▒Ă▒▒▒▒▒▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]


"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) (1) ->
(ClCompile ▒^▒[▒Q▒b▒g) ->
  C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  ..\libusb\io.c(24): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'assert.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  ..\libusb\strerror.c(22): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'locale.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\errno.h(14): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'crtdefs.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h(160): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'excpt.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  ..\libusb\os\windows_nt_common.c(28): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'process.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\windows.h(160): fatal error C1083: include ▒t▒@▒C▒▒▒▒▒J▒▒▒܂▒▒▒B'excpt.h':No such file or directory [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]

    1 ▒̌x▒▒
    10 ▒G▒▒▒[

▒o▒ߎ▒▒▒ 00:00:01.61
$ cmd "/C install_libusb_vs2013.cmd"

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rem This can only be run in a Git Shell or similar environments

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rem with access to git.exe and msbuild.exe.

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>rmdir /s /q libusb_src libusb
▒w▒肳▒ꂽ▒t▒@▒C▒▒▒▒▒▒▒▒▒▒܂▒▒▒B

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>git clone https://github.com/libusb/libusb.git libusb_src   || exit /b
Cloning into 'libusb_src'...
remote: Counting objects: 11605, done.
remote: Total 11605 (delta 0), reused 0 (delta 0), pack-reused 11605
Receiving objects: 100% (11605/11605), 2.78 MiB | 644.00 KiB/s, done.
Resolving deltas: 100% (8461/8461), done.
Checking connectivity... done.

C:\Users\kubotad\Desktop\temp\libfreenect2\depends>cd libusb_src

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git remote add xlz https://github.com/xlz/libusb.git

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git fetch xlz   || exit /b
remote: Counting objects: 21, done.
remote: Total 21 (delta 18), reused 18 (delta 18), pack-reused 3
Unpacking objects: 100% (21/21), done.
From https://github.com/xlz/libusb
 * [new branch]      master     -> xlz/master
 * [new branch]      winiso     -> xlz/winiso
 * [new branch]      zerocopy   -> xlz/zerocopy

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>git merge xlz/winiso
Auto-merging libusb/os/windows_winusb.h
Auto-merging libusb/os/windows_winusb.c
Merge made by the 'recursive' strategy.
 libusb/os/windows_winusb.c | 132 ++++++++++++++++++++++++++++++++++++++++++++-
 libusb/os/windows_winusb.h |  57 ++++++++++++++++++++
 2 files changed, 188 insertions(+), 1 deletion(-)

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set CONFIG=Release

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set YEAR=2013

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>set MSBUILD="C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe"

C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src>"C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe" msvc\libusb_dll_2013.vcxproj /p:Platform=x64 /p:Configuration=Release /target:Rebuild   || exit /b
Microsoft (R) Build Engine ▒o▒[▒W▒▒▒▒ 12.0.40629.0
[Microsoft .NET Framework▒A▒o▒[▒W▒▒▒▒ 4.0.30319.42000]
Copyright (C) Microsoft Corporation. All rights reserved.

2016/05/09 2:27:27 ▒Ƀr▒▒▒h▒▒▒J▒n▒▒▒܂▒▒▒▒B
▒m▒[▒h 1 ▒▒̃v▒▒▒W▒F▒N▒g "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g)▒B
CoreClean:
  ▒f▒B▒▒▒N▒g▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
PrepareForBuild:
  ▒f▒B▒▒▒N▒g▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\libusb-1.0 (dll).tlog\" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
InitializeBuildStatus:
  "AlwaysCreate" ▒▒▒w▒肳▒ꂽ▒▒▒▒ "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\libusb-1.0 (dll).tlog\unsuccessfulbuild" ▒▒▒쐬▒▒▒Ă▒▒܂▒▒B
ClCompile:
  C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\CL.exe /c /I. /I..\libusb /Zi /nologo /W4 /WX- /O2 /GL /D _WIN32 /D _WIN64 /D _LIB /D _CRT_SECURE_NO_WARNINGS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\\" /Fd"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\..\x64\Release\dll\libusb-1.0\vc120.pdb" /Gd /TC /errorReport:queue ..\libusb\core.c ..\libusb\descriptor.c ..\libusb\hotplug.c ..\libusb\io.c ..\libusb\os\poll_windows.c ..\libusb\strerror.c ..\libusb\sync.c ..\libusb\os\threads_windows.c ..\libusb\os\windows_nt_common.c ..\libusb\os\windows_winusb.c
  core.c
  descriptor.c
  hotplug.c
  io.c
  poll_windows.c
  strerror.c
..\libusb\strerror.c : warning C4819: ▒t▒@▒C▒▒▒́A▒▒▒݂̃R▒[▒h ▒y▒[▒W (932) ▒ŕ\▒▒▒ł▒▒Ȃ▒▒▒▒▒▒▒▒܂▒ł▒▒܂▒▒B▒f▒[▒^▒̑▒▒▒▒▒h▒▒▒▒▒߂ɁA▒t▒@▒C▒▒▒▒ Unicode ▒`▒▒▒ŕۑ▒▒▒▒Ă▒▒▒▒▒▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
..\libusb\strerror.c(111): error C2001: ▒萔▒▒ 2 ▒s▒ڂɑ▒▒▒▒Ă▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
..\libusb\strerror.c(117): error C2001: ▒萔▒▒ 2 ▒s▒ڂɑ▒▒▒▒Ă▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
  sync.c
  threads_windows.c
  windows_nt_common.c
  windows_winusb.c
..\libusb\os\windows_winusb.c(2851): warning C4244: '=' : 'int' ▒▒▒▒ 'SHORT' ▒ւ̕ϊ▒▒ł▒▒B▒f▒[▒^▒▒▒▒▒▒▒▒\▒▒▒▒▒▒▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
..\libusb\os\windows_winusb.c(2806): warning C4101: 'maxPacketSize' : ▒▒▒[▒J▒▒▒ϐ▒▒▒ 1 ▒x▒▒▒g▒▒▒Ă▒▒܂▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
▒v▒▒▒W▒F▒N▒g "C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) ▒̃r▒▒▒h▒▒▒I▒▒▒▒▒܂▒▒▒ -- ▒▒▒s▒B

▒r▒▒▒h▒Ɏ▒▒s▒▒▒܂▒▒▒▒B

"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) (1) ->
(ClCompile ▒^▒[▒Q▒b▒g) ->
  ..\libusb\strerror.c : warning C4819: ▒t▒@▒C▒▒▒́A▒▒▒݂̃R▒[▒h ▒y▒[▒W (932) ▒ŕ\▒▒▒ł▒▒Ȃ▒▒▒▒▒▒▒▒܂▒ł▒▒܂▒▒B▒f▒[▒^▒̑▒▒▒▒▒h▒▒▒▒▒߂ɁA▒t▒@▒C▒▒▒▒ Unicode ▒`▒▒▒ŕۑ▒▒▒▒Ă▒▒▒▒▒▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
  ..\libusb\os\windows_winusb.c(2851): warning C4244: '=' : 'int' ▒▒▒▒ 'SHORT' ▒ւ̕ϊ▒▒ł▒▒B▒f▒[▒^▒▒▒▒▒▒▒▒\▒▒▒▒▒▒▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
  ..\libusb\os\windows_winusb.c(2806): warning C4101: 'maxPacketSize' : ▒▒▒[▒J▒▒▒ϐ▒▒▒ 1 ▒x▒▒▒g▒▒▒Ă▒▒܂▒▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]


"C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj" (Rebuild ▒^▒[▒Q▒b▒g) (1) ->
(ClCompile ▒^▒[▒Q▒b▒g) ->
  ..\libusb\strerror.c(111): error C2001: ▒萔▒▒ 2 ▒s▒ڂɑ▒▒▒▒Ă▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]
  ..\libusb\strerror.c(117): error C2001: ▒萔▒▒ 2 ▒s▒ڂɑ▒▒▒▒Ă▒▒܂▒▒B [C:\Users\kubotad\Desktop\temp\libfreenect2\depends\libusb_src\msvc\libusb_dll_2013.vcxproj]

    3 ▒̌x▒▒
    2 ▒G▒▒▒[

▒o▒ߎ▒▒▒ 00:00:03.00
cmd "/C make_release_msvc.cmd 12 2013 Win64"

手作業でlibusbビルド

$ cmd "/C install_libusb_vs2013.cmd"

コマンドは、17行目、18行目で失敗しているっぽい。

https://github.com/OpenKinect/libfreenect2/blob/master/depends/install_libusb_vs2013.cmd#L17

libfreenect2\depends\libusb_src\msvc\libusb_2013.sln
Visual Studioで開いて、
libfreenect2\depends\libusb_src\libusb\strerror.c
のロシア語の部分を消した後、
Release x64
Rebuildしたらbuildできた。
libfreenect2\depends\libusb_src\x64\Release
にいろいろ出力された。

libfreenect2\depends\libusb\include\libusb-1.0
を作成。
とりあえず、↓を実行。

mkdir ..\libusb\include\libusb-1.0
copy libusb\libusb.h ..\libusb\include\libusb-1.0
mkdir ..\libusb\MS64\dll
copy x64\%CONFIG%\dll\*.lib ..\libusb\MS64\dll
copy x64\%CONFIG%\dll\*.dll ..\libusb\MS64\dll
copy x64\%CONFIG%\dll\*.pdb ..\libusb\MS64\dll

cmakeのインストール

git bashでcmakeと打ったら command not found だったので、cmakeをインストールする。

https://cmake.org/download/

cmake-3.4.3-win32-x86.exe
win32しかないっぽい。
インストールのオプションでPATH追加したら、長すぎて修正できないという警告が出た。
手動で足した。

cmake実行1回目 エラー

libfreenect2/build (master)
$ cmake .. -G "Visual Studio 12 2013 Win64"
-- The C compiler identification is MSVC 18.0.40629.0
-- The CXX compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- using tinythread as threading library
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Performing Test LIBUSB_WITH_LIBUSBK
-- Performing Test LIBUSB_WITH_LIBUSBK - Failed
-- Performing Test LIBUSB_WITH_USBDK
-- Performing Test LIBUSB_WITH_USBDK - Success
-- Found LibUSB: C:/Users/kubotad/Desktop/temp/libfreenect2/depends/libusb/MS64/dll/libusb-usbdk-1.0.lib
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find TegraJPEG (missing:  TegraJPEG_LIBRARIES TegraJPEG_INCLUDE_DIRS TegraJPEG_L4T_OK TegraJPEG_DRIVER_OK TegraJPEG_WORKS)
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find TurboJPEG (missing: TurboJPEG_LIBRARIES
  TurboJPEG_INCLUDE_DIRS TURBOJPEG_WORKS)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindTurboJPEG.cmake:66 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:240 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!
See also "C:/Users/kubotad/Desktop/temp/libfreenect2/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/kubotad/Desktop/temp/libfreenect2/build/CMakeFiles/CMakeError.log".

手順に書かれているTurboJPEGとかを入れていなかった。
libjpeg-turbo-1.4.2.tar.gz

libjpeg-turboのインストール 1

Windows 64bit用のインストーラーをダウンロード。
https://sourceforge.net/projects/libjpeg-turbo/files/1.4.2/libjpeg-turbo-1.4.2-vc64.exe/download

C:\libjpeg-turbo64
に配置された。環境変数:TurboJPEG_ROOTを設定した。

https://github.com/OpenKinect/libfreenect2/issues/418

~/Desktop/temp/libfreenect2/build (master)
$ cmake .. -G "Visual Studio 12 2013 Win64"
-- using tinythread as threading library
-- Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
-- Could NOT find JPEG (missing:  JPEG_LIBRARY JPEG_INCLUDE_DIR)
-- Could NOT find TegraJPEG (missing:  TegraJPEG_LIBRARIES TegraJPEG_INCLUDE_DIRS TegraJPEG_L4T_OK TegraJPEG_DRIVER_OK TegraJPEG_WORKS)
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find TurboJPEG (missing: TURBOJPEG_WORKS)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake/share/cmake-3.4/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake_modules/FindTurboJPEG.cmake:66 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:240 (FIND_PACKAGE)


-- Configuring incomplete, errors occurred!

libjpeg-turboのインストール 2

libjpeg-turboをソースからビルドしようとした。

https://gist.github.com/t-mat/3846536

https://sourceforge.net/projects/libjpeg-turbo/files/1.4.2/

 ~/Desktop/temp/libfreenect2/depends/libjpeg-turbo-1.4.2/build (master)
$ cmake .. -G "Visual Studio 12 2013 Win64"
-- The C compiler identification is MSVC 18.0.40629.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- CMAKE_BUILD_TYPE = Release
-- VERSION = 1.4.2, BUILD = 20160521
-- Arithmetic encoding support enabled
-- Arithmetic decoding support enabled
-- TurboJPEG C wrapper enabled
-- TurboJPEG Java wrapper disabled
-- In-memory source/destination managers enabled
-- 64-bit build
-- Install directory = c:/libjpeg-turbo64
-- Building x86_64 SIMD extensions
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/kubotad/Desktop/temp/libfreenect2/depends/libjpeg-turbo-1.4.2/build

buildディレクトリに何かいろいろ出力された。でもdllファイルとかがない。
libjpeg-turbo-1.4.2\build\libjpeg-turbo.sln
このファイルを元にVisualStudioでビルドしないといけないっぽい。

Error    1   error MSB6006: "cmd.exe" exited with code 9009. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets  170 5   simd
以下略

nasm

nasmとかいうのが必要らしいのでインストール。

http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/
Netwide Assembler 2.12.01

\AppData\Local\bin\NASM

Visual Studio のソリューションエクスプローラ
simdを右クリック > プロパティ
All ConfigurationのConfiguration Properties > VC++ Directoriesに
C:\Users\kubotad\AppData\Local\bin\NASM
を追加

UsbDk

UsbDkというドライバーをインストール。
発行元がRed Had Incだった。
https://github.com/daynix/UsbDk/releases

インストールしたけど何も起こらない。