Skip to content

Commit

Permalink
Change world_string to model_string in gz_spawn_model files (#606)
Browse files Browse the repository at this point in the history
* Change world_string to model_string

Also changed description from XML string to XML(SDF) string

Signed-off-by: Aarav Gupta <134804732+Amronos@users.noreply.github.com>
  • Loading branch information
Amronos authored Sep 12, 2024
1 parent 66c7a4a commit 0ec6976
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ros_gz_sim/launch/gz_spawn_model.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<launch>
<arg name="world" default="" />
<arg name="file" default="" />
<arg name="world_string" default="" />
<arg name="model_string" default="" />
<arg name="topic" default="" />
<arg name="entity_name" default="" />
<arg name="allow_renaming" default="False" />
Expand All @@ -14,7 +14,7 @@
<gz_spawn_model
world="$(var world)"
file="$(var file)"
world_string="$(var world_string)"
model_string="$(var model_string)"
topic="$(var topic)"
entity_name="$(var entity_name)"
allow_renaming="$(var allow_renaming)"
Expand Down
12 changes: 6 additions & 6 deletions ros_gz_sim/launch/gz_spawn_model.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def generate_launch_description():

world = LaunchConfiguration('world')
file = LaunchConfiguration('file')
world_string = LaunchConfiguration('world_string')
model_string = LaunchConfiguration('model_string')
topic = LaunchConfiguration('topic')
entity_name = LaunchConfiguration('entity_name')
allow_renaming = LaunchConfiguration('allow_renaming')
Expand All @@ -41,10 +41,10 @@ def generate_launch_description():
declare_file_cmd = DeclareLaunchArgument(
'file', default_value=TextSubstitution(text=''),
description='SDF filename')
declare_world_string_cmd = DeclareLaunchArgument(
'world_string',
declare_model_string_cmd = DeclareLaunchArgument(
'model_string',
default_value='',
description='XML string',
description='XML(SDF) string',
)
declare_topic_cmd = DeclareLaunchArgument(
'topic', default_value=TextSubstitution(text=''),
Expand All @@ -65,7 +65,7 @@ def generate_launch_description():
output='screen',
parameters=[{'world': world,
'file': file,
'string': world_string,
'string': model_string,
'topic': topic,
'name': entity_name,
'allow_renaming': allow_renaming,
Expand All @@ -84,7 +84,7 @@ def generate_launch_description():
# Declare the launch options
ld.add_action(declare_world_cmd)
ld.add_action(declare_file_cmd)
ld.add_action(declare_world_string_cmd)
ld.add_action(declare_model_string_cmd)
ld.add_action(declare_topic_cmd)
ld.add_action(declare_entity_name_cmd)
ld.add_action(declare_allow_renaming_cmd)
Expand Down
2 changes: 1 addition & 1 deletion ros_gz_sim/launch/ros_gz_spawn_model.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def generate_launch_description():
declare_model_string_cmd = DeclareLaunchArgument(
'model_string',
default_value='',
description='XML string',
description='XML(SDF) string',
)

declare_topic_cmd = DeclareLaunchArgument(
Expand Down
2 changes: 1 addition & 1 deletion ros_gz_sim/ros_gz_sim/actions/gz_spawn_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
:param: world World name.
:param: file SDF filename.
:param: model_string XML string.
:param: model_string XML(SDF) string.
:param: topic Get XML from this topic.
:param: entity_name Name of the entity.
:param: allow_renaming Whether the entity allows renaming or not.
Expand Down

0 comments on commit 0ec6976

Please sign in to comment.