From 905583e9047fe49d1d44f4efa9d9711791371ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 28 Dec 2023 11:09:26 +0100 Subject: [PATCH] Remove deprecations using ros_gz_sim_create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- ros_gz_sim/test/test_create_node.launch.py | 2 +- ros_gz_sim_demos/launch/joint_states.launch.py | 6 ++---- .../launch/robot_description_publisher.launch.py | 12 ++++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ros_gz_sim/test/test_create_node.launch.py b/ros_gz_sim/test/test_create_node.launch.py index 14710f58..79c31c5c 100644 --- a/ros_gz_sim/test/test_create_node.launch.py +++ b/ros_gz_sim/test/test_create_node.launch.py @@ -24,7 +24,7 @@ def generate_test_description(): expected_file_name = 'nonexistent/long/file_name' create = Node(package='ros_gz_sim', executable='create', - arguments=['-world', 'default', '-file', expected_file_name], output='screen') + parameters=[{'world': 'default', 'file': expected_file_name}], output='screen') test_create = Node(package='ros_gz_sim', executable='test_create', output='screen') return LaunchDescription([ create, diff --git a/ros_gz_sim_demos/launch/joint_states.launch.py b/ros_gz_sim_demos/launch/joint_states.launch.py index 95bf1906..7b61c350 100644 --- a/ros_gz_sim_demos/launch/joint_states.launch.py +++ b/ros_gz_sim_demos/launch/joint_states.launch.py @@ -63,10 +63,8 @@ def generate_launch_description(): spawn = Node( package='ros_gz_sim', executable='create', - arguments=[ - '-name', 'rrbot', - '-topic', 'robot_description', - ], + parameters=[{'name': 'rrbot', + 'topic': 'robot_description'}], output='screen', ) diff --git a/ros_gz_sim_demos/launch/robot_description_publisher.launch.py b/ros_gz_sim_demos/launch/robot_description_publisher.launch.py index 882cdee3..7fa6fc09 100755 --- a/ros_gz_sim_demos/launch/robot_description_publisher.launch.py +++ b/ros_gz_sim_demos/launch/robot_description_publisher.launch.py @@ -77,12 +77,12 @@ def generate_launch_description(): # Spawn spawn = Node(package='ros_gz_sim', executable='create', - arguments=[ - '-name', 'my_custom_model', - '-x', '1.2', - '-z', '2.3', - '-Y', '3.4', - '-topic', '/robot_description'], + parameters=[{ + 'name': 'my_custom_model', + 'x': 1.2, + 'z': 2.3, + 'Y': 3.4, + 'topic': '/robot_description'}], output='screen') return LaunchDescription([