-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
59 lines (46 loc) · 1.65 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
cmake_minimum_required(VERSION 3.0.2)
project(yolov4_trt_ros)
find_package(OpenCV 3.0 REQUIRED)
find_package(jetson-utils REQUIRED)
find_package(jetson-inference REQUIRED)
find_package(CUDA REQUIRED)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/package.xml ${CMAKE_CURRENT_SOURCE_DIR}/package.xml COPYONLY)
find_package(catkin REQUIRED COMPONENTS
image_transport
rospy
roscpp
sensor_msgs
vision_msgs
mavros_msgs
yolact_ros_msgs
cv_bridge
message_generation
)
add_message_files(
FILES
Detector2D.msg
Detector2DArray.msg
BoundingBox2D.msg
ObjectHypothesis.msg
)
catkin_python_setup()
generate_messages(DEPENDENCIES std_msgs vision_msgs)
catkin_package(
CATKIN_DEPENDS nodelet rospy roscpp image_transport sensor_msgs vision_msgs mavros_msgs yolact_ros_msgs cv_bridge message_runtime
)
link_directories(/usr/lib/aarch64-linux-gnu/tegra)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # enable c++11 (TensorRT requirement)
include_directories(${catkin_INCLUDE_DIRS} ${CUDA_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS})
add_definitions(-DROS1)
set(common_src src/image_converter.cpp src/ros_compat.cpp)
add_executable(tracker_node src/tracker_node.cpp)
target_link_libraries(tracker_node ${catkin_LIBRARIES})
#add_executable(video_source src/node_video_source.cpp ${common_src})
#add_executable(offb_node src/offb_node.cpp)
#target_link_libraries(offb_node ${catkin_LIBRARIES})
#add_executable(offb_node1 src/offb_node1.cpp)
#target_link_libraries(offb_node1 ${catkin_LIBRARIES})
#target_link_libraries(video_source ${catkin_LIBRARIES} jetson-inference)
catkin_install_python(PROGRAMS trt_yolo_v4_batch.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)