From 4b5f2abd86f53fe51c5124bcb3caf5f7816f4c61 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:54:36 +0100 Subject: [PATCH] Use member variables instead. (#653) (#655) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Carlos Agüero (cherry picked from commit 5c1251a658ad8dd276664c2c88300d27572e25da) Co-authored-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}], ), ],