-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
179 lines (161 loc) · 4.22 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.0.2)
project(detect_and_track)
## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)
add_compile_options(-std=c++17 -O3 -DPUBLISH_DETECTION_IMAGE -DPUBLISH_DETECTION_WITH_POSITION -DDEBUG_POSE -DPROFILE)
## Fastest compile options
#add_compile_options(-std=c++17 -O3)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
roscpp
sensor_msgs
geometry_msgs
std_msgs
message_generation
tf2_ros
tf2_geometry_msgs
)
find_package(OpenCV REQUIRED)
find_package(CUDA REQUIRED)
find_package(Eigen3 REQUIRED)
message("-- CUDA version: ${CUDA_VERSION}")
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)
include_directories(/home/antoine/Downloads/TensorRT-8.4.1.5/include)
link_directories(/home/antoine/Downloads/TensorRT-8.4.1.5/lib)
include_directories($(EIGEN3_INCLUDE_DIR))
add_message_files(
FILES
BoundingBox2D.msg
BoundingBoxes2D.msg
PositionBoundingBox2D.msg
PositionBoundingBox2DArray.msg
PositionID.msg
PositionIDArray.msg
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
DEPENDS OpenCV
INCLUDE_DIRS include
# LIBRARIES detect_and_track
CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs
# DEPENDS system_lib
)
include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_library(ObjectDetection src/ObjectDetection.cpp)
add_library(Tracker src/Tracker.cpp)
add_library(PoseEstimator src/PoseEstimator.cpp)
add_library(KalmanFilter src/KalmanFilter.cpp)
add_library(Hungarian src/Hungarian.cpp)
add_library(DetectionUtils src/DetectionUtils.cpp)
add_library(Utils src/utils.cpp)
add_library(ROSWrappers src/ROSWrappers.cpp)
add_executable(detect_node src/detect_node.cpp)
add_executable(detect_and_locate_node src/detect_and_locate_node.cpp)
add_executable(detect_and_track2D_node src/detect_and_track2D_node.cpp)
add_executable(detect_and_track3D_node src/detect_and_track3D_node.cpp)
add_executable(detect_track2D_and_locate_node src/detect_track2D_and_locate_node.cpp)
add_executable(track2D_node src/track2D_node.cpp)
target_link_libraries(detect_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
target_link_libraries(detect_and_locate_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
target_link_libraries(track2D_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
target_link_libraries(detect_and_track2D_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
target_link_libraries(detect_track2D_and_locate_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
target_link_libraries(detect_and_track3D_node
ROSWrappers
${catkin_LIBRARIES}
${OpenCV_LIBS}
DetectionUtils
Tracker
Hungarian
PoseEstimator
KalmanFilter
ObjectDetection
Utils
nvinfer
cudart
)
add_dependencies(ROSWrappers detect_and_track_generate_messages_cpp)
add_dependencies(detect_node detect_and_track_generate_messages_cpp)
add_dependencies(detect_and_locate_node detect_and_track_generate_messages_cpp)
add_dependencies(track2D_node detect_and_track_generate_messages_cpp)
add_dependencies(detect_and_track2D_node detect_and_track_generate_messages_cpp)
add_dependencies(detect_and_track3D_node detect_and_track_generate_messages_cpp)
add_dependencies(detect_track2D_and_locate_node detect_and_track_generate_messages_cpp)