From 6fa540efc934e6cbdd95c57b7ff82f1b81460c1b Mon Sep 17 00:00:00 2001 From: Aditya Date: Mon, 9 May 2022 18:46:07 -0700 Subject: [PATCH] Use shell=False in when launching gazebo Signed-off-by: Aditya --- gazebo_ros/launch/gzclient.launch.py | 8 ++++---- gazebo_ros/launch/gzserver.launch.py | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gazebo_ros/launch/gzclient.launch.py b/gazebo_ros/launch/gzclient.launch.py index bd26e0ffc..07fd1b39e 100644 --- a/gazebo_ros/launch/gzclient.launch.py +++ b/gazebo_ros/launch/gzclient.launch.py @@ -29,13 +29,13 @@ def generate_launch_description(): - cmd = [[ + cmd = [ 'gzclient', _boolean_command('version'), ' ', _boolean_command('verbose'), ' ', _boolean_command('help'), ' ', LaunchConfiguration('extra_gazebo_args'), - ]] + ] model, plugin, media = GazeboRosPaths.get_paths() @@ -99,7 +99,7 @@ def generate_launch_description(): cmd=cmd, output='screen', additional_env=env, - shell=True, + shell=False, prefix=prefix, on_exit=Shutdown(), condition=IfCondition(LaunchConfiguration('gui_required')), @@ -110,7 +110,7 @@ def generate_launch_description(): cmd=cmd, output='screen', additional_env=env, - shell=True, + shell=False, prefix=prefix, condition=UnlessCondition(LaunchConfiguration('gui_required')), ), diff --git a/gazebo_ros/launch/gzserver.launch.py b/gazebo_ros/launch/gzserver.launch.py index d687bf908..0ef02c2f3 100644 --- a/gazebo_ros/launch/gzserver.launch.py +++ b/gazebo_ros/launch/gzserver.launch.py @@ -185,7 +185,7 @@ def generate_launch_description(): cmd=cmd, output='screen', additional_env=env, - shell=True, + shell=False, prefix=prefix, on_exit=Shutdown(), condition=IfCondition(LaunchConfiguration('server_required')), @@ -196,7 +196,7 @@ def generate_launch_description(): cmd=cmd, output='screen', additional_env=env, - shell=True, + shell=False, prefix=prefix, condition=UnlessCondition(LaunchConfiguration('server_required')), ), @@ -219,6 +219,7 @@ def _arg_command(arg): # Add gazebo_ros plugins if true def _plugin_command(arg): - cmd = ['"-s libgazebo_ros_', arg, '.so" if "true" == "', LaunchConfiguration(arg), '" else ""'] + cmd = ['"-s', 'libgazebo_ros_', arg, '.so" if "true" == "', + LaunchConfiguration(arg), '" else ""'] py_cmd = PythonExpression(cmd) return py_cmd