-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
161 lines (127 loc) · 4.27 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
cmake_minimum_required(VERSION 2.8.3)
project(xenobot)
set(CMAKE_BUILD_TYPE Debug)
set(ROS_BUILD_TYPE Debug)
set(CMAKE_CXX_FLAGS "-std=c++0x")
find_package(
catkin REQUIRED COMPONENTS
cv_bridge
sensor_msgs
std_msgs
roscpp
message_generation
apriltags
)
find_package(Curses REQUIRED)
find_package(OpenCV REQUIRED)
add_message_files(
FILES
threshold_setting.msg
wheel_command.msg
segmentArray.msg
segment.msg
)
add_service_files(
FILES
SendHsv.srv
SetAtt.srv
)
generate_messages(DEPENDENCIES std_msgs)
catkin_package(
CATKIN_DEPENDS message_runtime
)
########################################################################################
#Color threshold calibration
set(
COLOR_THRESHOLD_INC
./calibration/color_threshold
./common
)
set(
COLOR_THRESHOLD_SRC
./calibration/color_threshold/main.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${COLOR_THRESHOLD_INC})
add_executable(color_threshold_calibration ${COLOR_THRESHOLD_SRC})
target_link_libraries (color_threshold_calibration ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} yaml-cpp raspicam_cv raspicam)
add_dependencies(color_threshold_calibration ${PROJECT_NAME}_generate_messages_cpp)
########################################################################################
#Intrinsic calibration (Provide raw image)
set(
INTRINSIC_CALIBRATION_INC
./calibration/intrinsic_calibration
)
set(
INTRINSIC_CALIBRATION_SRC
./calibration/intrinsic_calibration/main.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${INTRINSIC_CALIBRATION_INC})
add_executable(intrinsic_calibration ${INTRINSIC_CALIBRATION_SRC})
target_link_libraries (intrinsic_calibration ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} yaml-cpp raspicam_cv raspicam)
########################################################################################
#Extrinsic calibration
set(
EXTRINSIC_CALIBRATION_INC
./calibration/extrinsic_calibration
)
set(
EXTRINSIC_CALIBRATION_SRC
./calibration/extrinsic_calibration/main.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${EXTRINSIC_CALIBRATION_INC})
add_executable(extrinsic_calibration ${EXTRINSIC_CALIBRATION_SRC})
target_link_libraries (extrinsic_calibration ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} yaml-cpp raspicam_cv raspicam)
########################################################################################
#JOYSTICK
set(
JOYSTICK_INC
./joystick
)
set(
JOYSTICK_SRC
./joystick/main.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${CURSES_INCLUDE_DIR} ${JOYSTICk_INC})
add_executable(joystick ${JOYSTICK_SRC})
target_link_libraries (joystick ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} ${CURSES_LIBRARIES} yaml-cpp raspicam_cv)
add_dependencies(joystick ${PROJECT_NAME}_generate_messages_cpp)
########################################################################################
#Object tracker
set(
XENOBOT_INC
./system
./system/motor_driver
./common
)
set(
XENOBOT_SRC
./common/xeno_math.cpp
./system/main.cpp
./system/lane_detector.cpp
./system/controller.cpp
./system/motor.cpp
./system/camera.cpp
./system/apriltags_detector.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${XENOBOT_INC})
add_executable(activate_controller ${XENOBOT_SRC})
target_link_libraries (activate_controller ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} -lwiringPi yaml-cpp raspicam_cv raspicam)
add_dependencies(activate_controller ${PROJECT_NAME}_generate_messages_cpp)
################################################################################
#Image Capture
add_executable(image_capture tools/image_capture.cpp)
target_link_libraries (image_capture ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} )
################################################################################
#Camera attribute
set(
CAMERA_ATTRIBUTE_INC
./system
)
set(
CAMERA_ATTRIBUTE_SRC
./calibration/camera_attribute/main.cpp
./system/camera.cpp
)
include_directories(${catkin_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS} ${CAMERA_ATTRIBUTE_INC})
add_executable(camera_attribute_set ${CAMERA_ATTRIBUTE_SRC})
target_link_libraries (camera_attribute_set ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} raspicam_cv raspicam yaml-cpp)