Made toid_vision into composable node
This commit is contained in:
@@ -14,7 +14,7 @@ set(PACKAGE_DEPS
|
||||
message_filters
|
||||
cv_bridge
|
||||
OpenCV
|
||||
|
||||
rclcpp_components
|
||||
tf2
|
||||
tf2_ros
|
||||
tf2_geometry_msgs
|
||||
@@ -38,6 +38,10 @@ set(SOURCES
|
||||
src/vision.cpp
|
||||
)
|
||||
|
||||
set(SOURCES_COMPOSABLE
|
||||
src/toid_vision.cpp
|
||||
)
|
||||
|
||||
add_executable(toid_vision ${SOURCES})
|
||||
|
||||
target_include_directories(
|
||||
@@ -50,6 +54,39 @@ ament_target_dependencies(toid_vision ${PACKAGE_DEPS})
|
||||
|
||||
install(TARGETS toid_vision DESTINATION lib/${PROJECT_NAME})
|
||||
|
||||
# TOID_VISION COMPOSABLE NODE
|
||||
|
||||
add_library(toid_vision_component SHARED ${SOURCES_COMPOSABLE})
|
||||
|
||||
rclcpp_components_register_node(
|
||||
toid_vision_component
|
||||
PLUGIN "toid::NutDetector"
|
||||
EXECUTABLE nut_detector
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
toid_vision_component
|
||||
PRIVATE
|
||||
include
|
||||
)
|
||||
|
||||
ament_target_dependencies(toid_vision_component ${PACKAGE_DEPS})
|
||||
|
||||
ament_export_targets(export_toid_vision_component)
|
||||
install(TARGETS toid_vision_component
|
||||
EXPORT export_toid_vision_component
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
launch
|
||||
config
|
||||
DESTINATION share/${PROJECT_NAME}/
|
||||
)
|
||||
|
||||
target_compile_features(
|
||||
toid_vision PUBLIC
|
||||
c_std_99
|
||||
|
||||
Reference in New Issue
Block a user