File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ add_executable(
5656)
5757target_link_libraries (component_container component_manager rclcpp::rclcpp)
5858
59+ add_executable (
60+ component_container_event
61+ src/component_container_event.cpp
62+ )
63+ target_link_libraries (component_container_event component_manager rclcpp::rclcpp)
64+
5965set (node_main_template_install_dir "share/${PROJECT_NAME} " )
6066install (FILES
6167 src/node_main.cpp.in
@@ -145,7 +151,7 @@ install(
145151
146152# Install executables
147153install (
148- TARGETS component_container component_container_mt component_container_isolated
154+ TARGETS component_container component_container_mt component_container_isolated component_container_event
149155 RUNTIME DESTINATION lib/${PROJECT_NAME}
150156)
151157
Original file line number Diff line number Diff line change 1+ // Copyright 2025 Open Source Robotics Foundation, Inc.Add commentMore actions
2+ //
3+ // Licensed under the Apache License, Version 2.0 (the "License");
4+ // you may not use this file except in compliance with the License.
5+ // You may obtain a copy of the License at
6+ //
7+ // http://www.apache.org/licenses/LICENSE-2.0
8+ //
9+ // Unless required by applicable law or agreed to in writing, software
10+ // distributed under the License is distributed on an "AS IS" BASIS,
11+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ // See the License for the specific language governing permissions and
13+ // limitations under the License.Add commentMore actions
14+
15+ #include < memory>
16+
17+ #include " rclcpp/rclcpp.hpp"
18+ #include " rclcpp/experimental/executors/events_executor/events_executor.hpp"
19+
20+ #include " rclcpp_components/component_manager.hpp"
21+
22+ int main (int argc, char * argv[])
23+ {
24+ // / Component container with an events executor.
25+ rclcpp::init (argc, argv);
26+ auto exec = std::make_shared<rclcpp::experimental::executors::EventsExecutor>();
27+ auto node = std::make_shared<rclcpp_components::ComponentManager>(exec);
28+ exec->add_node (node);
29+ exec->spin ();
30+ }
You can’t perform that action at this time.
0 commit comments