-
Notifications
You must be signed in to change notification settings - Fork 35
/
CMakeLists.txt
129 lines (116 loc) · 3.71 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
cmake_minimum_required(VERSION 2.8.3)
project(coral_usb)
find_package(
catkin REQUIRED
catkin_virtualenv
dynamic_reconfigure
message_generation
)
catkin_python_setup()
add_service_files(
FILES
StartNode.srv
StopNode.srv
ListNodes.srv
)
generate_messages()
generate_dynamic_reconfigure_options(
cfg/EdgeTPUObjectDetector.cfg
cfg/EdgeTPUPanoramaObjectDetector.cfg
cfg/EdgeTPUTileObjectDetector.cfg
cfg/EdgeTPUFaceDetector.cfg
cfg/EdgeTPUPanoramaFaceDetector.cfg
cfg/EdgeTPUTileFaceDetector.cfg
cfg/EdgeTPUHumanPoseEstimator.cfg
cfg/EdgeTPUPanoramaHumanPoseEstimator.cfg
cfg/EdgeTPUPanoramaSemanticSegmenter.cfg
)
catkin_package(
CATKIN_DEPENDS message_runtime
)
find_package(Git REQUIRED)
if (NOT EXISTS ${PROJECT_SOURCE_DIR}/python/coral_usb/posenet/pose_engine.py)
add_custom_target(posenet_update ALL
COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive python/coral_usb/posenet
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
)
endif()
if (${catkin_virtualenv_VERSION} VERSION_LESS "0.6.1")
message(WARNING "Please install catkin_virtualenv>=0.6.1.")
message(WARNING "Current catkin_virtualen version is ${catkin_virtualenv_VERSION}")
else()
catkin_generate_virtualenv(
INPUT_REQUIREMENTS requirements.in
PYTHON_INTERPRETER python3
USE_SYSTEM_PACKAGES TRUE
ISOLATE_REQUIREMENTS FALSE
CHECK_VENV FALSE
)
file(GLOB NODE_SCRIPTS_FILES node_scripts/*)
catkin_install_python(
PROGRAMS ${NODE_SCRIPTS_FILES}
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
endif()
catkin_install_python(
PROGRAMS scripts/download_models.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
DIRECTORY cfg docker launch training
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS
)
install(FILES requirements.in requirements.txt
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
if(CATKIN_ENABLE_TESTING)
catkin_install_python(
PROGRAMS
test/dummy_edgetpu_object_detector.py
test/dummy_edgetpu_panorama_object_detector.py
test/dummy_edgetpu_tile_object_detector.py
test/dummy_edgetpu_face_detector.py
test/dummy_edgetpu_panorama_face_detector.py
test/dummy_edgetpu_tile_face_detector.py
test/dummy_edgetpu_human_pose_estimator.py
test/dummy_edgetpu_panorama_human_pose_estimator.py
test/dummy_edgetpu_semantic_segmenter.py
test/dummy_edgetpu_panorama_semantic_segmenter.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
find_package(rostest REQUIRED)
# object detector
add_rostest(test/dummy_edgetpu_object_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_panorama_object_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_tile_object_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
# face detector
add_rostest(test/dummy_edgetpu_face_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_panorama_face_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_tile_face_detector.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
# human pose estimator
add_rostest(test/dummy_edgetpu_human_pose_estimator.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_panorama_human_pose_estimator.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
# semantic segmenter
add_rostest(test/dummy_edgetpu_semantic_segmenter.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
add_rostest(test/dummy_edgetpu_panorama_semantic_segmenter.test
DEPENDENCIES ${PROJECT_NAME}_generate_virtualenv
)
endif()