From 681c8d950e7aca11949742d8948698fbad6277c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Ag=C3=BCero?= Date: Thu, 21 Nov 2024 21:35:11 +0100 Subject: [PATCH] Use member variables instead. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Agüero --- ros_gz_sim/ros_gz_sim/actions/gzserver.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ros_gz_sim/ros_gz_sim/actions/gzserver.py b/ros_gz_sim/ros_gz_sim/actions/gzserver.py index 12d288f4..2665ea4d 100644 --- a/ros_gz_sim/ros_gz_sim/actions/gzserver.py +++ b/ros_gz_sim/ros_gz_sim/actions/gzserver.py @@ -23,7 +23,7 @@ from launch.frontend import Entity, expose_action, Parser from launch.launch_context import LaunchContext from launch.some_substitutions_type import SomeSubstitutionsType -from launch.substitutions import LaunchConfiguration, PythonExpression +from launch.substitutions import PythonExpression from launch_ros.actions import ComposableNodeContainer, LoadComposableNodes, Node from launch_ros.descriptions import ComposableNode @@ -125,8 +125,8 @@ def execute(self, context: LaunchContext) -> Optional[List[Action]]: package='ros_gz_sim', executable='gzserver', output='screen', - parameters=[{'world_sdf_file': LaunchConfiguration('world_sdf_file'), - 'world_sdf_string': LaunchConfiguration('world_sdf_string')}], + parameters=[{'world_sdf_file': self.__world_sdf_file, + 'world_sdf_string': self.__world_sdf_string}], ), ], ) @@ -145,8 +145,8 @@ def execute(self, context: LaunchContext) -> Optional[List[Action]]: package='ros_gz_sim', plugin='ros_gz_sim::GzServer', name='gz_server', - parameters=[{'world_sdf_file': LaunchConfiguration('world_sdf_file'), - 'world_sdf_string': LaunchConfiguration('world_sdf_string')}], + parameters=[{'world_sdf_file': self.__world_sdf_file, + 'world_sdf_string': self.__world_sdf_string}], extra_arguments=[{'use_intra_process_comms': True}], ), ], @@ -166,8 +166,8 @@ def execute(self, context: LaunchContext) -> Optional[List[Action]]: package='ros_gz_sim', plugin='ros_gz_sim::GzServer', name='gz_server', - parameters=[{'world_sdf_file': LaunchConfiguration('world_sdf_file'), - 'world_sdf_string': LaunchConfiguration('world_sdf_string')}], + parameters=[{'world_sdf_file': self.__world_sdf_file, + 'world_sdf_string': self.__world_sdf_string}], extra_arguments=[{'use_intra_process_comms': True}], ), ],