ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

XML syntax error while running a launch file

asked 2021-12-09 14:06:52 -0600

N5m5sis26 gravatar image

updated 2021-12-09 19:29:25 -0600

Mike Scheutzow gravatar image

I am using ROS melodic on ubuntu 18.04. I was trying to run the following launch file:

    <param name="teleop_topic" value="/turtle1/cmd_vel"/>
    <!-- Loading teleop parameter file -->
    <rosparam command="load" file="$(find gesture_teleop)/config/teleop_config.yaml"/>
    <!-- Launching ros serial nodes -->
    <node name="rosserial_server_node" pkg="rosserial_python" type="" args="$(arg port)" output="screen"/>
    <!-- Starting gesture teleop node -->
    <node name="gesture_teleop_node" pkg="gesture_teleop" type="" output="screen"/>
    <!-- Starting turtlebot 2D simualation -->
    <node name="turtlebot_node" pkg="turtlesim" type="turtlesim_node" output="screen"/>

However , it gave an error:

RLException: Invalid roslaunch XML syntax: no element found: line 1, column 0
The traceback for the exception was written to the log file

What exactly is the error in the first line?

edit retag flag offensive close merge delete


Pls look at prior answers and note the things that you have tried:

osilva gravatar image osilva  ( 2021-12-09 17:47:23 -0600 )edit

Hi. Please paste the exact command you are using to 'run' the launch file. This error happens when you call the launch file using 'rosrun' command. I think you are trying rosrun to launch the file which is not correct.

Muhammad Umar gravatar image Muhammad Umar  ( 2021-12-09 19:33:45 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-12-09 19:20:24 -0600

Mike Scheutzow gravatar image

There's nothing obviously wrong with the launch file content you copy/pasted. The most common reason to get this error is if the launch file you specified on the roslaunch command line is actually empty (has no xml tags.)

Are you maybe generating this file at startup?

edit flag offensive delete link more


yes, that was the case with me. I was saving and editing the same file somewhere else

Shivam gravatar image Shivam  ( 2022-12-17 18:45:47 -0600 )edit

Question Tools



Asked: 2021-12-09 14:06:52 -0600

Seen: 446 times

Last updated: Dec 09 '21