"required" atribute in node not working in XML launch files on foxy

asked 2022-02-25 06:31:19 -0600

hcostelha gravatar image

Hi,

Lat year I used the "required" atribute in ros foxy when using "ros2 launch", but I am now getting the following error:

launch.invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [xml]: Unexpected attribute(s) found in `node`: {'required'}

This is a very straightforward XML launch file, as seen below (the "stage_ros" package is a package I have in my own workspace):

<launch>
  <group>
    <push-ros-namespace namespace="robot_0"/>
    <!-- Run the stage simulator -->
    <node pkg="stage_ros" exec="stageros" name="stage" 
          args="$(find-pkg-share worlds)/stage-worlds/factory_laser.world"
          required="true"/>
  </group>
</launch>

If I remove the "required" attribute, the launch runs without any problems. According to the information available here, the "required" attribute should be available in ros foxy, and I have not found any information in contrary.

I know that I can achieve the intended behavior with the Python launch files, but in this particular example, I wanted to use the XML launch file.

edit retag flag offensive close merge delete