-
Notifications
You must be signed in to change notification settings - Fork 9
/
CMakeLists.txt
163 lines (143 loc) · 3.49 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
cmake_minimum_required(VERSION 3.5)
project(naoqi_driver)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(diagnostic_msgs REQUIRED)
find_package(diagnostic_updater REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(image_transport REQUIRED)
find_package(kdl_parser REQUIRED)
find_package(naoqi_bridge_msgs REQUIRED)
find_package(naoqi_libqi REQUIRED)
find_package(naoqi_libqicore REQUIRED)
find_package(robot_state_publisher REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(tf2_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(OpenCV REQUIRED)
find_package(Boost QUIET COMPONENTS chrono filesystem program_options regex system thread random)
set(
CONVERTERS_SRC
src/converters/audio.cpp
src/converters/touch.cpp
src/converters/camera.cpp
src/converters/diagnostics.cpp
src/converters/imu.cpp
src/converters/info.cpp
src/converters/joint_state.cpp
src/converters/laser.cpp
src/converters/memory_list.cpp
src/converters/memory/bool.cpp
src/converters/memory/int.cpp
src/converters/memory/float.cpp
src/converters/memory/string.cpp
src/converters/sonar.cpp
src/converters/log.cpp
src/converters/odom.cpp
)
set(
TOOLS_SRC
src/tools/robot_description.cpp
src/tools/from_any_value.cpp
)
set(
PUBLISHER_SRC
src/publishers/camera.cpp
src/publishers/joint_state.cpp
src/publishers/log.cpp
src/publishers/sonar.cpp
)
set(
SUBSCRIBER_SRC
src/subscribers/teleop.cpp
src/subscribers/moveto.cpp
src/subscribers/speech.cpp
)
set(
SERVICES_SRC
src/services/robot_config.cpp
src/services/set_language.cpp
src/services/get_language.cpp
)
set(
ACTIONS_SRC
src/actions/listen.cpp
)
set(
RECORDER_SRC
src/recorder/camera.cpp
src/recorder/diagnostics.cpp
src/recorder/joint_state.cpp
src/recorder/log.cpp
src/recorder/sonar.cpp
)
set(
DRIVER_SRC
src/naoqi_driver.cpp
src/helpers/driver_helpers.cpp
src/helpers/ros_helpers.cpp
src/recorder/globalrecorder.cpp
src/event/basic.hxx
src/event/basic.hpp
src/event/audio.cpp
src/event/touch.cpp
)
add_definitions(-DLIBQI_VERSION=${naoqi_libqi_VERSION_MAJOR}${naoqi_libqi_VERSION_MINOR})
# Add pre-processor compile flag indicating ament
add_definitions( -DAMENT_BUILD )
include_directories(
"include"
${naoqi_libqi_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
add_library(
naoqi_driver
SHARED
${DRIVER_SRC}
${CONVERTERS_SRC}
${PUBLISHER_SRC}
${SUBSCRIBER_SRC}
${SERVICES_SRC}
${ACTIONS_SRC}
${RECORDER_SRC}
${TOOLS_SRC}
)
ament_target_dependencies(naoqi_driver
rclcpp
rclcpp_action
cv_bridge
diagnostic_msgs
diagnostic_updater
geometry_msgs
image_transport
kdl_parser
naoqi_bridge_msgs
naoqi_libqi
naoqi_libqicore
robot_state_publisher
sensor_msgs
tf2_geometry_msgs
tf2_msgs
tf2_ros
OpenCV
Boost
)
install(TARGETS naoqi_driver DESTINATION lib/)
# create the binary of the bridge
add_executable(naoqi_driver_node src/external_registration.cpp)
target_link_libraries(naoqi_driver_node
naoqi_driver
${rclcpp_LIBRARIES}
${naoqi_libqi_LIBRARIES}
${Boost_LIBRARIES}
)
install(TARGETS naoqi_driver_node DESTINATION lib/${PROJECT_NAME})
# install the urdf for runtime loading
install(DIRECTORY share DESTINATION share/${PROJECT_NAME})
# install the launch files
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
ament_export_libraries(naoqi_driver)
ament_package()