ros2 / launch

Tools for launching multiple processes and for writing tests involving multiple processes.
Apache License 2.0
124 stars 139 forks source link

Inconsistent syntax for arg tag in XML launch #720

Open mjforan opened 1 year ago

mjforan commented 1 year ago

Bug report

Required Info:

Steps to reproduce issue

Example section of XML launch file for starting Gazebo simulator

<arg name="world_name"      default="warehouse"/>  <!-- world name -->
<!-- Launch Ignition Gazebo --> 
<include file="/launch/ign_gazebo.launch.py">
    <arg name="ign_args" value="/config/worlds/$(var world_name).sdf $(var use_levels)"/>
</include>

Expected behavior

According to the launch migration guide, <arg> should be used with default and <let> should be used with value. However, When arg is nested under an include tag it is necessary to use the value instead. You can see in the example how arg has two different syntaxes, depending on the context.

Actual behavior

Attempting to use the suggested syntax triggers the following error:

Caught exception when trying to load file of format [xml]: Attribute value of type <class 'str'> not found in Entity arg