-
Notifications
You must be signed in to change notification settings - Fork 6
feat: Implement CMake macro for registering nodes with CallbackIsolatedExecutor #37
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
rclcpp_components_register_nodes() is a CMake macro for registering composable nodes with rclcpp_components::ComponentManager. However, when using CallbackIsolatedExecutor (CIE), a dedicated container (component_container_callback_isolated) must be used, and there is currently no way to specify the executor type at node registration time.
By providing a CIE-specific CMake macro, users can declaratively specify which executor to use when registering composable nodes.
Motivation
Current workflow:
- Register composable nodes with
rclcpp_components_register_nodes() - Manually specify
component_container_callback_isolatedin the launch file
This approach has the following issues:
- No consistency guarantee between CMakeLists.txt and launch files: Since executor specification is separated between node registration and runtime, nodes may unintentionally run with the wrong executor
- Usability: The configuration steps required to use CIE are scattered, making it difficult for new users to set up correctly
Proposed API
# Option 1: Wrapper around rclcpp_components_register_nodes
cie_register_nodes(<target> <node_class_name>)
# Option 2: Generic macro with executor as an argument
cie_components_register_node(<target>
PLUGIN <node_class_name>
EXECUTOR callback_isolated # or "single"
)Scope
- Implement CMake macro/function (
.cmakefile) - Export from
callback_isolated_executorpackage - Update documentation and samples (migrate
cie_sample_application'sCMakeLists.txtto the new macro)
References
rclcpp_components_register_nodes: Existing implementation for reference
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request