-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-mrpt2.patch
391 lines (359 loc) · 15 KB
/
ros-noetic-mrpt2.patch
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
diff --git a/3rdparty/nanogui/CMakeLists.txt b/3rdparty/nanogui/CMakeLists.txt
index 5918d38..e36804d 100644
--- a/3rdparty/nanogui/CMakeLists.txt
+++ b/3rdparty/nanogui/CMakeLists.txt
@@ -377,7 +377,8 @@ elseif (APPLE)
find_library(iokit_library IOKit)
target_link_libraries(${PROJECT_NAME} PRIVATE ${cocoa_library} ${opengl_library} ${corevideo_library} ${iokit_library})
elseif(CMAKE_SYSTEM MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "BSD")
- target_link_libraries(${PROJECT_NAME} PRIVATE GL Xxf86vm Xrandr X11 pthread) # Xinerama Xcursor Xi
+ find_package(X11)
+ target_link_libraries(${PROJECT_NAME} PRIVATE GL pthread ${X11_LIBRARIES}) # Xinerama Xcursor Xi
if (NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
target_link_libraries(${PROJECT_NAME} PRIVATE rt)
endif()
diff --git a/apps/benchmarking-image-features/src/mainwindow.h b/apps/benchmarking-image-features/src/mainwindow.h
index 898de8f..7e27ae7 100644
--- a/apps/benchmarking-image-features/src/mainwindow.h
+++ b/apps/benchmarking-image-features/src/mainwindow.h
@@ -215,7 +215,7 @@ class MainWindow : public QMainWindow
//! monocular single dataset
int tracking_image_counter; //!< counter for moving forward in the dataset
- Tracker tracker_obj; //<! tracker oject which calls the tracking method to
+ MRPTTracker tracker_obj; //<! tracker oject which calls the tracking method to
// perform tracking
/// tracker parameter variables
diff --git a/apps/benchmarking-image-features/src/tracker.cpp b/apps/benchmarking-image-features/src/tracker.cpp
index 9870e88..b8944e0 100644
--- a/apps/benchmarking-image-features/src/tracker.cpp
+++ b/apps/benchmarking-image-features/src/tracker.cpp
@@ -23,7 +23,7 @@ using namespace mrpt::img;
/************************************************************************************************
* Tracker Constructor *
************************************************************************************************/
-Tracker::Tracker()
+MRPTTracker::MRPTTracker()
{
hasResolution = false;
step_num = 0;
@@ -42,7 +42,7 @@ Tracker::Tracker()
/************************************************************************************************
* Track Them All tracker *
************************************************************************************************/
-cv::Mat Tracker::trackThemAll(
+cv::Mat MRPTTracker::trackThemAll(
vector<string> files_fullpath_tracking, int tracking_image_counter,
int remove_lost_feats, int add_new_feats, int max_feats, int patch_size,
int window_width, int window_height)
diff --git a/apps/benchmarking-image-features/src/tracker.h b/apps/benchmarking-image-features/src/tracker.h
index 36fe1bb..4ffb876 100644
--- a/apps/benchmarking-image-features/src/tracker.h
+++ b/apps/benchmarking-image-features/src/tracker.h
@@ -51,10 +51,10 @@ using namespace mrpt::vision;
using namespace mrpt::math;
using namespace mrpt::img;
using namespace mrpt;
-using namespace cv;
+//using namespace cv;
using namespace std;
-class Tracker
+class MRPTTracker
{
public:
bool hasResolution;
@@ -81,7 +81,7 @@ class Tracker
/**
* Tracker constructor to initialize the varibales for the tracker
*/
- Tracker();
+ MRPTTracker();
/**
* trackThemAll this function tracks the features based on the parameters
diff --git a/cmakemodules/script_jsoncpp.cmake b/cmakemodules/script_jsoncpp.cmake
index ce10b5b..98dbac3 100644
--- a/cmakemodules/script_jsoncpp.cmake
+++ b/cmakemodules/script_jsoncpp.cmake
@@ -6,8 +6,9 @@ option(DISABLE_JSONCPP "Forces NOT using JSONCPP, even if it could be found by C
mark_as_advanced(DISABLE_JSONCPP)
if(NOT DISABLE_JSONCPP)
- find_package(jsoncpp QUIET)
- if(jsoncpp_FOUND)
+ # find_package(jsoncpp QUIET)
+ pkg_check_modules(JSONCPP jsoncpp)
+ if(JSONCPP_FOUND)
# cmake imported target: "jsoncpp_lib"
set(CMAKE_MRPT_HAS_JSONCPP 1)
set(CMAKE_MRPT_HAS_JSONCPP_SYSTEM 1)
diff --git a/cmakemodules/script_openni2.cmake b/cmakemodules/script_openni2.cmake
index a0fe762..619d865 100644
--- a/cmakemodules/script_openni2.cmake
+++ b/cmakemodules/script_openni2.cmake
@@ -4,7 +4,7 @@
# =========================================================
set(CMAKE_MRPT_HAS_OPENNI2 0)
-option(DISABLE_OPENNI2 "Disable the OpenNI2 library, even if automatically found" "OFF")
+option(DISABLE_OPENNI2 "Disable the OpenNI2 library, even if automatically found" "ON")
mark_as_advanced(DISABLE_OPENNI2)
if (DISABLE_OPENNI2) # Allow the user to force not using this lib
diff --git a/cmakemodules/script_show_final_summary.cmake b/cmakemodules/script_show_final_summary.cmake
index ca6cdc0..7beaa08 100644
--- a/cmakemodules/script_show_final_summary.cmake
+++ b/cmakemodules/script_show_final_summary.cmake
@@ -130,7 +130,7 @@ SHOW_CONFIG_LINE_SYSTEM("Assimp (3D models) " CMAKE_MRPT_HAS_AS
SHOW_CONFIG_LINE_SYSTEM("ffmpeg libs (Video streaming) " CMAKE_MRPT_HAS_FFMPEG "[avcodec ${LIBAVCODEC_VERSION}, avutil ${LIBAVUTIL_VERSION}, avformat ${LIBAVFORMAT_VERSION}]")
SHOW_CONFIG_LINE_SYSTEM("fyaml (YAML/JSON parsing) " CMAKE_MRPT_HAS_LIBFYAML)
SHOW_CONFIG_LINE_SYSTEM("gtest (Google unit testing library) " CMAKE_MRPT_HAS_GTEST )
-SHOW_CONFIG_LINE_SYSTEM("jsoncpp (JSON format serialization) " CMAKE_MRPT_HAS_JSONCPP "[Version: ${jsoncpp_VERSION}]")
+SHOW_CONFIG_LINE_SYSTEM("jsoncpp (JSON format serialization) " CMAKE_MRPT_HAS_JSONCPP "[Version: ${JSONCPP_VERSION}]")
SHOW_CONFIG_LINE_SYSTEM("libjpeg (jpeg) " CMAKE_MRPT_HAS_JPEG)
SHOW_CONFIG_LINE_SYSTEM("liblas (ASPRS LAS LiDAR format) " CMAKE_MRPT_HAS_LIBLAS)
SHOW_CONFIG_LINE ("mexplus " CMAKE_MRPT_HAS_MATLAB)
diff --git a/cmakemodules/script_wxwidgets.cmake b/cmakemodules/script_wxwidgets.cmake
index 9cbd648..87ede40 100644
--- a/cmakemodules/script_wxwidgets.cmake
+++ b/cmakemodules/script_wxwidgets.cmake
@@ -9,7 +9,7 @@ set(wxWidgets_MRPT_COMPONENTS_TO_SEARCH "base;core;gl;adv;aui;html" CACHE STRING
set(CMAKE_MRPT_HAS_WXWIDGETS 0)
set(wxWidgets_LIBRARIES "")
-set(DISABLE_WXWIDGETS OFF CACHE BOOL "Forces compilation WITHOUT wxWidgets")
+set(DISABLE_WXWIDGETS ON CACHE BOOL "Forces compilation WITHOUT wxWidgets")
mark_as_advanced(DISABLE_WXWIDGETS)
if(DISABLE_WXWIDGETS)
return()
diff --git a/cmakemodules/script_xsens.cmake b/cmakemodules/script_xsens.cmake
index 1ca7406..ef6f8a0 100644
--- a/cmakemodules/script_xsens.cmake
+++ b/cmakemodules/script_xsens.cmake
@@ -46,7 +46,7 @@ if (BUILD_XSENS)
# In Linux: libusb-1.0
if(PKG_LIBUSB10_FOUND)
# Perfect, we have libusb-1.0
- set(XSENS4_LIBS ${XSENS4_LIBS} ${PKG_LIBUDEV_LIBRARIES})
+ set(XSENS4_LIBS ${XSENS4_LIBS} ${PKG_LIBUSB10_LIBRARIES})
else(PKG_LIBUSB10_FOUND)
message(SEND_ERROR "BUILD_XSENS requires libusb-1.0. Install it or disable BUILD_XSENS")
endif(PKG_LIBUSB10_FOUND)
diff --git a/libs/comms/CMakeLists.txt b/libs/comms/CMakeLists.txt
index 8e24def..9ea433e 100644
--- a/libs/comms/CMakeLists.txt
+++ b/libs/comms/CMakeLists.txt
@@ -18,5 +18,5 @@ endif()
target_link_libraries(comms PRIVATE Threads::Threads)
if(CMAKE_MRPT_HAS_FTDI_SYSTEM)
- target_link_libraries(comms PRIVATE imp_ftdi)
+ target_link_libraries(comms PUBLIC imp_ftdi ${PKG_LIBUDEV_LIBRARIES} ${PKG_LIBUSB10_LIBRARIES})
endif()
diff --git a/libs/core/CMakeLists.txt b/libs/core/CMakeLists.txt
index 47c6feb..a2ef97f 100644
--- a/libs/core/CMakeLists.txt
+++ b/libs/core/CMakeLists.txt
@@ -16,6 +16,10 @@ if(BUILD_mrpt-core)
target_link_libraries(core PRIVATE Threads::Threads) # for WorkerThreads
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(core PRIVATE rt)
+ endif()
+
# Enforce C++17 in all dependent projects:
mrpt_lib_target_requires_cpp17(core)
diff --git a/libs/gui/CMakeLists.txt b/libs/gui/CMakeLists.txt
index e551b17..c35a545 100644
--- a/libs/gui/CMakeLists.txt
+++ b/libs/gui/CMakeLists.txt
@@ -65,4 +65,7 @@ if(BUILD_mrpt-gui)
target_link_libraries(gui PUBLIC mrpt::nanogui)
endif()
+ find_package(X11)
+ target_link_libraries(gui PRIVATE ${X11_LIBRARIES})
+
endif()
diff --git a/libs/hwdrivers/CMakeLists.txt b/libs/hwdrivers/CMakeLists.txt
index c45fc79..d7d7c6c 100644
--- a/libs/hwdrivers/CMakeLists.txt
+++ b/libs/hwdrivers/CMakeLists.txt
@@ -97,13 +97,17 @@ endif()
# XSens MT4 required libs:
if (BUILD_XSENS)
- target_link_libraries(hwdrivers PRIVATE ${XSENS4_LIBS})
+ target_link_libraries(hwdrivers PUBLIC ${XSENS4_LIBS})
endif ()
if(UNIX)
target_link_libraries(hwdrivers PRIVATE dl)
endif()
+if(UNIX AND NOT APPLE)
+ target_link_libraries(hwdrivers PRIVATE rt)
+endif()
+
if(CMAKE_MRPT_HAS_OPENNI2)
target_link_libraries(hwdrivers PRIVATE ${MRPT_OPENNI2_LIBRARIES})
endif()
diff --git a/libs/img/CMakeLists.txt b/libs/img/CMakeLists.txt
index 919b683..c4882b1 100644
--- a/libs/img/CMakeLists.txt
+++ b/libs/img/CMakeLists.txt
@@ -21,13 +21,13 @@ if(BUILD_mrpt-img)
endif()
if(CMAKE_MRPT_HAS_OPENCV)
- target_link_libraries(img PRIVATE imp_opencv)
+ target_link_libraries(img PUBLIC imp_opencv)
endif()
if(CMAKE_MRPT_HAS_JPEG)
if(NOT CMAKE_MRPT_HAS_JPEG_SYSTEM)
add_dependencies(img JPEG)
endif()
- target_link_libraries(img PRIVATE ${JPEG_LIBRARIES})
+ target_link_libraries(img PUBLIC ${JPEG_LIBRARIES})
endif()
endif()
diff --git a/libs/maps/CMakeLists.txt b/libs/maps/CMakeLists.txt
index 55139c9..ed539f1 100644
--- a/libs/maps/CMakeLists.txt
+++ b/libs/maps/CMakeLists.txt
@@ -30,7 +30,7 @@ define_mrpt_lib(
if(BUILD_mrpt-maps)
if(CMAKE_MRPT_HAS_LIBLAS)
- target_link_libraries(maps PRIVATE ${LAS_LIBS})
+ target_link_libraries(maps PUBLIC ${LAS_LIBS})
endif()
if (CMAKE_MRPT_HAS_OCTOMAP)
@@ -40,10 +40,10 @@ if(BUILD_mrpt-maps)
if(TARGET "EP_octomap")
add_dependencies(maps EP_octomap)
endif()
- target_link_libraries(maps PRIVATE ${OCTOMAP_LIBRARIES})
+ target_link_libraries(maps PUBLIC ${OCTOMAP_LIBRARIES})
endif()
- target_link_libraries(maps PRIVATE ${MRPT_OPENGL_LIBS})
+ target_link_libraries(maps PUBLIC ${MRPT_OPENGL_LIBS})
# Windows only: the mxplus lib internally requires linking with opencv (sigh...)
diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt
index 5c9cfbb..9213adb 100644
--- a/libs/math/CMakeLists.txt
+++ b/libs/math/CMakeLists.txt
@@ -83,7 +83,7 @@ if(BUILD_mrpt-math)
endif()
if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "")
- target_link_libraries(math PRIVATE ${SuiteSparse_LIBRARIES})
+ target_link_libraries(math PUBLIC ${SuiteSparse_LIBRARIES})
endif ()
if (NOT "${SuiteSparse_LIBRARIES}" STREQUAL "")
target_include_directories(math PUBLIC ${SuiteSparse_INCLUDE_DIRS})
diff --git a/libs/opengl/CMakeLists.txt b/libs/opengl/CMakeLists.txt
index 9a9ac68..4321632 100644
--- a/libs/opengl/CMakeLists.txt
+++ b/libs/opengl/CMakeLists.txt
@@ -44,11 +44,11 @@ if(BUILD_mrpt-opengl)
endif()
# Link against gl, glu, glut:
- target_link_libraries(opengl PRIVATE
+ target_link_libraries(opengl PUBLIC
${MRPT_OPENGL_LIBS}
)
if (TARGET mrpt_glew) # Basically, for Windows
- target_link_libraries(opengl PRIVATE mrpt_glew)
+ target_link_libraries(opengl PUBLIC mrpt_glew)
endif()
# Link against assimp:
@@ -56,6 +56,6 @@ if(BUILD_mrpt-opengl)
if(TARGET "EP_assimp")
add_dependencies(opengl EP_assimp)
endif()
- target_link_libraries(opengl PRIVATE ${ASSIMP_LIBRARIES})
+ target_link_libraries(opengl PUBLIC ${ASSIMP_LIBRARIES})
endif ()
endif()
diff --git a/libs/serialization/CMakeLists.txt b/libs/serialization/CMakeLists.txt
index 9b711d4..5f85caf 100644
--- a/libs/serialization/CMakeLists.txt
+++ b/libs/serialization/CMakeLists.txt
@@ -1,16 +1,8 @@
# Extra dependencies required by unit tests in this module:
# Include jsoncpp only if present (optional)
-if (CMAKE_MRPT_HAS_JSONCPP)
- if(TARGET "jsoncpp_lib")
- set(tst_json_dep "jsoncpp_lib")
- else()
- set(tst_json_dep "jsoncpp_lib_static")
- endif()
-else()
- set(tst_json_dep "")
-endif()
+# find_package(JsonCpp REQUIRED)
# define those deps:
-set_property(GLOBAL PROPERTY mrpt_serialization_UNIT_TEST_EXTRA_DEPS mrpt-io mrpt-poses ${tst_json_dep})
+set_property(GLOBAL PROPERTY mrpt_serialization_UNIT_TEST_EXTRA_DEPS mrpt-io mrpt-poses ${JSONCPP_LIBRARIES})
#---------------------------------------------
# Macro declared in "DeclareMRPTLib.cmake":
@@ -23,5 +15,5 @@ define_mrpt_lib(
)
if(BUILD_mrpt-serialization)
- target_link_libraries(serialization PRIVATE ${tst_json_dep})
+ target_link_libraries(serialization PUBLIC ${JSONCPP_LIBRARIES})
endif( )
diff --git a/libs/serialization/include/mrpt/serialization/CSchemeArchive.h b/libs/serialization/include/mrpt/serialization/CSchemeArchive.h
index 744c14c..03ecf55 100644
--- a/libs/serialization/include/mrpt/serialization/CSchemeArchive.h
+++ b/libs/serialization/include/mrpt/serialization/CSchemeArchive.h
@@ -70,12 +70,6 @@ class CSchemeArchive : public mrpt::serialization::CSchemeArchiveBase_impl
m_val = val;
return *m_parent;
}
- mrpt::serialization::CSchemeArchiveBase& operator=(
- const std::nullptr_t val) override
- {
- m_val = val;
- return *m_parent;
- }
mrpt::serialization::CSchemeArchiveBase& operator=(
const std::string val) override
{
diff --git a/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h b/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h
index dfaaf22..5ee7bc2 100644
--- a/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h
+++ b/libs/serialization/include/mrpt/serialization/CSchemeArchiveBase.h
@@ -32,7 +32,6 @@ class CSchemeArchiveBase_impl
virtual CSchemeArchiveBase& operator=(const uint64_t) = 0;
virtual CSchemeArchiveBase& operator=(const float) = 0;
virtual CSchemeArchiveBase& operator=(const double) = 0;
- virtual CSchemeArchiveBase& operator=(const std::nullptr_t) = 0;
virtual CSchemeArchiveBase& operator=(const std::string) = 0;
virtual CSchemeArchiveBase& operator=(bool) = 0;
diff --git a/libs/system/CMakeLists.txt b/libs/system/CMakeLists.txt
index 37c858c..cb29260 100644
--- a/libs/system/CMakeLists.txt
+++ b/libs/system/CMakeLists.txt
@@ -18,12 +18,15 @@ target_link_libraries(system PRIVATE Threads::Threads)
if(BUILD_mrpt-system)
if(WIN32)
target_link_libraries(system PRIVATE Dbghelp) # For mrpt::system::getCallStackBackTrace()
- else()
- target_link_libraries(system PRIVATE ${CMAKE_DL_LIBS}) # For mrpt::system::getCallStackBackTrace()
+ # else()
+ # target_link_libraries(system PRIVATE ${CMAKE_DL_LIBS}) # For mrpt::system::getCallStackBackTrace()
endif()
# -ldl required by the plugin load mechanism loadPluginModule()
if(UNIX)
target_link_libraries(system PRIVATE dl)
endif()
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(system PRIVATE rt)
+ endif()
endif()
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index e7dd05b..75f5afb 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -11,6 +11,7 @@ include_directories(include)
include_directories(
${Boost_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
+ ${OpenCV_INCLUDE_DIRS}
)
# Find Numpy include directory
execute_process(
@@ -60,7 +61,7 @@ add_definitions(-DROS_EXTENSIONS)
target_link_libraries(pymrpt
${Boost_LIBRARIES}
- ${Opencv_LIBRARIES}
+ ${OpenCV_LIBRARIES}
Python3::Python
)