2019년 3월 6일 수요일

[Note] Setup DepthEyes-H1

1. Download DepthEyeSdk-master from https://github.com/pointcloud-ai/DepthEyeSdk


2. Unzip it.

3. copy the rules of permission for USB connection under root privilige.

# cp DepthEyeSdk-master/third_party/udev/rules.d/72-DepthEyeH1CDK.rules /etc/udev/rules.d/

3.1. Reload udev rules.

# udevadm control --reload-rules && udevadm trigger

4. Plug DepthEye-H1 in USB hub powered by external adaptor.

5. Verify the connection.

# lsusb
Bus 003 Device 002: ID 8087:8000 Intel Corp.
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 050: ID 0451:9107 Texas Instruments, Inc. 
Bus 002 Device 002: ID 17ef:60a9 Lenovo
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

6. Export SDK path.
$ export VOXEL_SDK_PATH="third_party/voxelsdk_ubuntu_4.13"
$ export PATH=$VOXEL_SDK_PATH/lib:$VOXEL_SDK_PATH/bin:$PATH

7. Build SDK.

$ mkdir build

$ cd build/

$ cmake ..
-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info -- Detecting C compiler ABI info - done
-- Detecting C compile features -- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done CMAKE_SYSTEM_NAME = Linux VERSION=4.19.0-2-amd64(4-19-0) ARCH = x86_64 use Voxel SDK ./third_party/voxelsdk_ubuntu_4.13/lib
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/Workspace/DepthEyeSdk-master/build

$ make
Scanning dependencies of target deptheye
[ 25%] Building CXX object src/CMakeFiles/deptheye.dir/DepthEyeInterface.cpp.o
[ 50%] Linking CXX static library ../lib/libdeptheye.a
[ 50%] Built target deptheye Scanning dependencies of target H1AsciiSample
[ 75%] Building CXX object test/CMakeFiles/H1AsciiSample.dir/H1AsciiSample.cpp.o
[100%] Linking CXX executable ../bin/H1AsciiSample
[100%] Built target H1AsciiSample

8. Test

$ ./bin/H1AsciiSample
 INFO: load path path size:3 INFO: load path file size =0
 INFO: load path /home/user/.Voxel/lib file size =0
 INFO: load path /usr/lib/voxel file size =0
 WARNING: CameraSystem: No depth camera library found or loaded.
 ERROR: Find depth camera FAILED
 Press any key to quit

Woops...