From ce7ad9f95e89d279a288e504b6adae1eda82047d Mon Sep 17 00:00:00 2001 From: CihatAltiparmak Date: Sat, 3 Aug 2024 15:49:27 +0300 Subject: [PATCH] Eexcuted add_two_ints_server in Node instead of ExecuteProcess. - ExecuteProcess runs two process which are sh and ros2_node, if there is no signal handler for SIGINT, SIGTERM etc. when sh is terminated, some process may continue to run without killing. --- launch/scenario_basic_service_client_benchmark.launch.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/launch/scenario_basic_service_client_benchmark.launch.py b/launch/scenario_basic_service_client_benchmark.launch.py index 5d341ae..9ab7b1d 100644 --- a/launch/scenario_basic_service_client_benchmark.launch.py +++ b/launch/scenario_basic_service_client_benchmark.launch.py @@ -21,9 +21,10 @@ def launch_setup(context, *args, **kwargs): context.perform_substitution(LaunchConfiguration("sending_request_number")) ) - add_two_ints_server_node = ExecuteProcess( - cmd=[["ros2 run demo_nodes_cpp add_two_ints_server"]], - shell=True, + add_two_ints_server_node = Node( + name="add_two_ints_server", + package="demo_nodes_cpp", + executable="add_two_ints_server", ) benchmark_main_node = Node(