@@ -26,10 +26,15 @@ int main(int argc, char * argv[])
26
26
rclcpp::init (argc, argv);
27
27
// parse arguments
28
28
bool use_multi_threaded_executor{false };
29
+ bool use_events_executor{false };
29
30
std::vector<std::string> args = rclcpp::remove_ros_arguments (argc, argv);
30
31
for (auto & arg : args) {
31
- if (arg == std::string (" --use_multi_threaded_executor" )) {
32
+ if (arg == std::string (" --use_multi_threaded_executor" ) ||
33
+ arg == std::string (" --use-multi-threaded-executor" ))
34
+ {
32
35
use_multi_threaded_executor = true ;
36
+ } else if (arg == std::string (" --use-events-executor" )) {
37
+ use_events_executor = true ;
33
38
}
34
39
}
35
40
// create executor and component manager
@@ -39,6 +44,10 @@ int main(int argc, char * argv[])
39
44
using ComponentManagerIsolated =
40
45
rclcpp_components::ComponentManagerIsolated<rclcpp::executors::MultiThreadedExecutor>;
41
46
node = std::make_shared<ComponentManagerIsolated>(exec);
47
+ } else if (use_events_executor) {
48
+ using ComponentManagerIsolated =
49
+ rclcpp_components::ComponentManagerIsolated<rclcpp::experimental::executors::EventsExecutor>;
50
+ node = std::make_shared<ComponentManagerIsolated>(exec);
42
51
} else {
43
52
using ComponentManagerIsolated =
44
53
rclcpp_components::ComponentManagerIsolated<rclcpp::executors::SingleThreadedExecutor>;
0 commit comments