-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-rtabmap.patch
192 lines (169 loc) · 6.14 KB
/
ros-noetic-rtabmap.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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b42fbf41..534df4f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,14 +83,6 @@ IF(MINGW)
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--enable-auto-import")
ENDIF(MINGW)
-# GCC 4 required
-IF(UNIX OR MINGW)
- EXEC_PROGRAM( gcc ARGS "-dumpversion" OUTPUT_VARIABLE GCC_VERSION )
- IF(GCC_VERSION VERSION_LESS "4.0.0")
- MESSAGE(FATAL_ERROR "GCC ${GCC_VERSION} found, but version 4.x.x minimum is required")
- ENDIF(GCC_VERSION VERSION_LESS "4.0.0")
-ENDIF(UNIX OR MINGW)
-
#The CDT Error Parser cannot handle error messages that span
#more than one line, which is the default gcc behavior.
#In order to force gcc to generate single line error messages with no line wrapping
@@ -167,14 +159,14 @@ OPTION(BUILD_TOOLS "Build tools" ON)
OPTION(BUILD_EXAMPLES "Build examples" ON)
####### DEPENDENCIES #######
-IF(MOBILE_BUILD)
+IF(FALSE)
option(WITH_QT "Include Qt support" OFF)
ELSE()
option(WITH_QT "Include Qt support" ON)
ENDIF()
option(WITH_ORB_OCTREE "Include ORB Octree feature support" ON)
option(WITH_TORCH "Include Torch support (SuperPoint)" OFF)
-option(WITH_PYTHON "Include Python3 support (PyMatcher, PyDetector)" OFF)
+option(WITH_PYTHON "Include Python3 support (PyMatcher, PyDetector)" ON)
option(WITH_PYTHON_THREADING "Use more than one Python interpreter." OFF)
option(WITH_PDAL "Include PDAL support" ON)
option(WITH_LIBLAS "Include libLAS support" OFF)
@@ -339,9 +331,9 @@ IF(WITH_QT)
IF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
# For VCPKG build, set those global variables to off,
# we will enable them for jsut specific targets
- set(CMAKE_AUTOMOC OFF)
- set(CMAKE_AUTORCC OFF)
- set(CMAKE_AUTOUIC OFF)
+ set(CMAKE_AUTOMOC ON)
+ set(CMAKE_AUTORCC ON)
+ set(CMAKE_AUTOUIC ON)
IF("${VTK_MAJOR_VERSION}" EQUAL 5)
FIND_PACKAGE(QVTK REQUIRED) # only for VTK 5
ELSE()
@@ -386,6 +378,8 @@ IF(WITH_QT)
ENDIF()
ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # To avoid conflicts with boost signals/foreach and Qt macros
ENDIF(QT4_FOUND OR Qt5_FOUND OR Qt6_FOUND)
+ELSE()
+ add_compile_definitions(DISABLE_VTK)
ENDIF(WITH_QT)
IF(NOT VTK_FOUND)
diff --git a/corelib/src/CMakeLists.txt b/corelib/src/CMakeLists.txt
index 0033140b..44e540cd 100644
--- a/corelib/src/CMakeLists.txt
+++ b/corelib/src/CMakeLists.txt
@@ -241,6 +241,8 @@ IF(WITH_PYTHON AND Python3_FOUND)
SET(INCLUDE_DIRS
${TORCH_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/python
+ ${Python3_INCLUDE_DIRS}
+ ${Python3_NumPy_INCLUDE_DIRS}
${INCLUDE_DIRS}
)
ENDIF(WITH_PYTHON AND Python3_FOUND)
diff --git a/utilite/include/rtabmap/utilite/Posix/UThreadC.h b/utilite/include/rtabmap/utilite/Posix/UThreadC.h
index e773c55f..b15a7c24 100644
--- a/utilite/include/rtabmap/utilite/Posix/UThreadC.h
+++ b/utilite/include/rtabmap/utilite/Posix/UThreadC.h
@@ -54,9 +54,9 @@ inline void uSleepNano(unsigned int ns)
}
-#define InvalidHandle 0
-#define THREAD_HANDLE pthread_t
-
+#define InvalidHandle 0
+#define THREAD_HANDLE pthread_t
+
typedef void *( * pthread_fn )( void * );
template
@@ -116,12 +116,12 @@ class UThreadC
Instance I(Param,0,Function,CancelEnable,CancelAsync);
- Handle h=InvalidHandle;
- int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
-
- pthread_attr_destroy(&attr);
-
- if(H) *H = h;
+ Handle h=InvalidHandle;
+ int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
+
+ pthread_attr_destroy(&attr);
+
+ if(H) *H = h;
if ( !R ) S_Create().acquire();
M_Create().unlock();
@@ -149,12 +149,12 @@ class UThreadC
Instance I(Param,const_cast<UThreadC *>(this),0,CancelEnable,CancelAsync);
- Handle h=InvalidHandle;
- int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
-
- pthread_attr_destroy(&attr);
-
- if(H) *H = h;
+ Handle h=InvalidHandle;
+ int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
+
+ pthread_attr_destroy(&attr);
+
+ if(H) *H = h;
if ( !R ) S_Create().acquire();
M_Create().unlock();
@@ -232,7 +232,7 @@ class UThreadC<void>
typedef THREAD_HANDLE Handle;
typedef void ( *Handler)();
- virtual ~UThreadC<void>() {}
+ virtual ~UThreadC() {}
protected:
UThreadC<void>() {}
@@ -273,12 +273,12 @@ class UThreadC<void>
Instance I(0,Function,CancelEnable,CancelAsync);
- Handle h=InvalidHandle;
- int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
-
- pthread_attr_destroy(&attr);
-
- if(H) *H = h;
+ Handle h=InvalidHandle;
+ int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
+
+ pthread_attr_destroy(&attr);
+
+ if(H) *H = h;
if ( !R ) S_Create().acquire();
M_Create().unlock();
@@ -305,12 +305,12 @@ class UThreadC<void>
Instance I(const_cast<UThreadC *>(this),0,CancelEnable,CancelAsync);
- Handle h=InvalidHandle;
- int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
-
- pthread_attr_destroy(&attr);
-
- if(H) *H = h;
+ Handle h=InvalidHandle;
+ int R = pthread_create((pthread_t *)&h,&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
+
+ pthread_attr_destroy(&attr);
+
+ if(H) *H = h;
if ( !R ) S_Create().acquire();
M_Create().unlock();
@@ -338,13 +338,13 @@ class UThreadC<void>
Instance I(const_cast<UThreadC *>(this),0,CancelEnable,CancelAsync);
- *H = InvalidHandle;
+ *H = InvalidHandle;
int R = pthread_create((pthread_t *)&(*H),&attr,(pthread_fn)ThreadMainHandler,(void *)&I);
-
+
ThreadId = (unsigned long)*H;
-
- pthread_attr_destroy(&attr);
-
+
+ pthread_attr_destroy(&attr);
+
if ( !R ) S_Create().acquire();
M_Create().unlock();