From 77dee4dac199180fd6b58a12d818f5c0b70f4db8 Mon Sep 17 00:00:00 2001 From: YusukeKato Date: Tue, 24 Oct 2023 17:29:02 +0900 Subject: [PATCH] =?UTF-8?q?world=5Fname=E5=BC=95=E6=95=B0=E3=82=92?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E3=81=AB=E4=BD=BF=E7=94=A8=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launch/raspimouse_with_emptyworld.launch.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py index 2e14c1e..4a8b60b 100644 --- a/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py +++ b/raspimouse_gazebo/launch/raspimouse_with_emptyworld.launch.py @@ -48,7 +48,7 @@ def generate_launch_description(): description='Set "true" to mount rgb camera.') declare_arg_world_name = DeclareLaunchArgument( 'world_name', - default_value='empty_world.sdf', + default_value=get_package_share_directory('raspimouse_gazebo')+'/worlds/empty_world.sdf', description='Set world name.') env = {'IGN_GAZEBO_SYSTEM_PLUGIN_PATH': os.environ['LD_LIBRARY_PATH'], @@ -56,17 +56,10 @@ def generate_launch_description(): get_package_share_directory('raspimouse_description')) + ':' + os.path.join(get_package_share_directory('raspimouse_gazebo'), 'models'), } - world_name = str(LaunchConfiguration('world_name', default='empty_world.sdf')) - print(world_name) - world_file = os.path.join( - get_package_share_directory('raspimouse_gazebo'), - 'worlds', - LaunchConfiguration('world_name') - ) gui_config = os.path.join( get_package_share_directory('raspimouse_gazebo'), 'gui', 'gui.config') ign_gazebo = ExecuteProcess( - cmd=['ign gazebo -r', world_file, '--gui-config', gui_config], + cmd=['ign gazebo -r', LaunchConfiguration('world_name'), '--gui-config', gui_config], output='screen', additional_env=env, shell=True