Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
---
title: "Monado - Building Additional Dependencies"
layout: main
---
* TOC
{:toc}
## Dependencies needed to build Monado's additional drivers
[checked on Fedora 38]
### For the OpenHMD driver
git clone https://github.com/OpenHMD/OpenHMD.git
cd OpenHMD
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON
sudo ninja -C build install
sudo ln -s /usr/lib/pkgconfig/openhmd.pc /usr/lib64/pkgconfig
### For the libsurvive driver
Some other dependencies are needed.
* On Debian/Ubuntu:
sudo apt install liblapacke-dev libopenblas-dev
* On Fedora:
sudo dnf install openblas-devel lapack-devel
Then, libsurvice can be built and installed:
git clone https://github.com/cntools/libsurvive.git
cd libsurvive
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DOPENVR_INCLUDE_PATH=/home/degrande/Projects/VAirDraw/vairdraw-src/externals/openvr/headers
sudo ninja -C build install
### For the Realsense driver
* On Debian/Ubuntu: ```...```
* On Fedora: ```dnf install librealsense-devel```
### For the DepthAI driver
git clone --recurse-submodules https://github.com/luxonis/depthai-core.git
cd depthai-core
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON
sudo ninja -C build install
### For SLAM tracking support, using Basalt
Some other dependencies are needed.
* On Debian/Ubuntu:
...
* On Fedora:
sudo dnf install tbb-devel glew-devel libpng-devel lz4-devel bzip2-devel boost-devel boost-regex boost-filesystem boost-date-time boost-program-options boost-serialization gtest-devel fmt-devel
\
**Basalt** uses Pangolin, which (in the included version) needs libuvc. On Debian/Ubuntu, it is packaged as ```libuvc-dev```, but it has to be built on Fedora:
git clone https://github.com/libuvc/libuvc.git
cd libuvc
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
sudo ninja -C build install
\
**Note** Pangolin (in the included version) fails to compile with GCC 13, due to missing inclusions of ```<cstdint>``` (see https://www.gnu.org/software/gcc/gcc-13/porting_to.html, Header dependency changes).
Add `#include <cstdint>` near the other inclusions in:
* thirdparty/Pangolin/src/image/image_io_jpg.cpp
* thirdparty/Pangolin/include/pangolin/log/packetstream_tags.h
\
Then, Basalt can be built and installed:
git clone --recurse-submodules https://gitlab.freedesktop.org/mateosss/basalt
cd basalt
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
sudo ninja -C build install
sudo ln -s /usr/lib/pkgconfig/basalt.pc /usr/lib64/pkgconfig
### For 'Mercury' Hand Tracking, using the ONNX Runtime
Some other dependencies are needed.
* On Debian/Ubuntu:
...
* On Fedora:
sudo dnf install gmock-devel patch
\
Then, onnxruntime can be built and installed:
git clone --recurse-submodules https://github.com/Microsoft/onnxruntime.git
cd onnxruntime
./build.sh --config Release --build_shared_lib --parallel --skip_tests --compile_no_warning_as_error --cmake_extra_defines CMAKE_INSTALL_PREFIX=/usr --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF
cd build/Linux/Release
sudo make install
\
**Note** FlatBuffers fails to compile with GCC 13. A patch is to be applied to ignore a compilation warning (turned into an error). Once `onxxruntime.git` is cloned and before to run `./build.sh ...`, two modifications are needed:
1. Create a file named onnxruntime/cmake/patches/flatbuffers/flatbuffers_cmake.patch, with the following content:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3987eac..5e5462f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -223,7 +223,7 @@ elseif(CMAKE_COMPILER_IS_GNUCXX)
"${CMAKE_CXX_FLAGS} -std=c++0x")
endif(CYGWIN)
set(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow")
+ "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror -Wextra -Werror=shadow -Wno-error=stringop-overflow")
set(FLATBUFFERS_PRIVATE_CXX_FLAGS "-Wold-style-cast")
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.4)
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
1. Edit the file onnxruntime/cmake/external/onnxruntime_external_deps.cmake to change:
#flatbuffers 1.11.0 does not have flatbuffers::IsOutRange, therefore we require 1.12.0+
FetchContent_Declare(
flatbuffers
URL ${DEP_URL_flatbuffers}
URL_HASH SHA1=${DEP_SHA1_flatbuffers}
FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers
)
into:
#flatbuffers 1.11.0 does not have flatbuffers::IsOutRange, therefore we require 1.12.0+
FetchContent_Declare(
flatbuffers
URL ${DEP_URL_flatbuffers}
URL_HASH SHA1=${DEP_SHA1_flatbuffers}
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/flatbuffers/flatbuffers_cmake.patch
FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers
)
Then, you can proceed with the compilation (`./build.sh ....`).
### For the UltraLeap driver
Get the latest Linux version from https://www2.leapmotion.com/v2-developer-beta-linux. \
Then (adapt the names to the downloaded version number):
tar -xzf Leap_Motion_SDK_Linux_2.3.1.tgz
cd LeapDeveloperKit_2.3.1+31549_linux/LeapSDK
sudo cp include/Leap.h /usr/include
sudo cp include/LeapMath.h /usr/include
sudo cp lib/x64/libLeap.so /usr/lib64
### To use Tracy as a tracing backend
Some other dependencies are needed.
* On Debian/Ubuntu:
...
* On Fedora:
sudo dnf install glfw-devel freetype-devel capstone-devel dbus-devel
\
Then, tracy can be built and installed:
git clone git clone https://github.com/wolfpld/tracy.git
cd tracy
cd profiler/build/unix
sudo make LEGACY=1
**Note**: Monado needs to be built with tracing support:
cmake .... -DXRT_HAVE_TRACY=ON -DXRT_FEATURE_TRACING=ON