Skip to content

Commit

Permalink
Merge pull request #198 from bjsowa/use-templated-node-executables
Browse files Browse the repository at this point in the history
Create node executables using rclcpp_component macros
  • Loading branch information
jonbinney authored Jul 23, 2024
2 parents fb10f8b + 2a9d757 commit c9bfbbf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 127 deletions.
22 changes: 13 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ ament_auto_add_library(laser_scan_filters SHARED src/laser_scan_filters.cpp)
ament_auto_add_library(laser_filter_chains SHARED
src/scan_to_cloud_filter_chain.cpp
src/scan_to_scan_filter_chain.cpp)
rclcpp_components_register_nodes(laser_filter_chains
"ScanToCloudFilterChain"
"ScanToScanFilterChain")

set(FILTER_CHAINS
scan_to_cloud_filter_chain
scan_to_scan_filter_chain
# The rclcpp_components_register_node macro registers an rclcpp component for the node with
# the ament resource index AND creates a templated executable that spins the given node.

rclcpp_components_register_node(
laser_filter_chains
PLUGIN "ScanToCloudFilterChain"
EXECUTABLE "scan_to_cloud_filter_chain"
)

rclcpp_components_register_node(
laser_filter_chains
PLUGIN "ScanToScanFilterChain"
EXECUTABLE "scan_to_scan_filter_chain"
)
foreach(FILTER_CHAIN ${FILTER_CHAINS})
ament_auto_add_executable(${FILTER_CHAIN} src/${FILTER_CHAIN}_node.cpp)
endforeach()

ament_auto_add_executable(generic_laser_filter_node src/generic_laser_filter_node.cpp)

Expand Down
59 changes: 0 additions & 59 deletions src/scan_to_cloud_filter_chain_node.cpp

This file was deleted.

59 changes: 0 additions & 59 deletions src/scan_to_scan_filter_chain_node.cpp

This file was deleted.

0 comments on commit c9bfbbf

Please sign in to comment.