-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
53 lines (34 loc) · 1.19 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
cmake_minimum_required(VERSION 3.14)
project(listener)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
find_package(PCL REQUIRED COMPONENTS common io)
find_package (OpenCV REQUIRED)
find_package (Boost REQUIRED)
find_package(image_transport REQUIRED) # Required for image transport functionality
find_package(cv_bridge REQUIRED) # Required for OpenCV to ROS image conversion
find_package(sensor_msgs REQUIRED) # Since you're subscribing to an IMU topic
# listener
ament_auto_add_library(listener SHARED
src/listener_node.cpp
)
# Add compile definitions and include directories for PCL and OpenCV
target_compile_definitions(listener PUBLIC ${PCL_DEFINITIONS})
target_include_directories(listener PUBLIC
${PCL_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)
# Link PCL and OpenCV libraries
target_link_libraries(listener ${PCL_LIBRARIES} ${OpenCV_LIBRARIES})
# Register the listener node
rclcpp_components_register_node(listener
PLUGIN "Listener"
EXECUTABLE listener_node
)
######
ament_auto_package(INSTALL_TO_SHARE
launch
)