Ask Your Question
0

XML syntax error while running a launch file

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

N5m5sis26 gravatar image

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

Mike Scheutzow gravatar image

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

<launch>
    <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="serial_node.py" args="$(arg port)" output="screen"/>
    <!-- Starting gesture teleop node -->
    <node name="gesture_teleop_node" pkg="gesture_teleop" type="gesture_teleop.py" output="screen"/>
    <!-- Starting turtlebot 2D simualation -->
    <node name="turtlebot_node" pkg="turtlesim" type="turtlesim_node" output="screen"/>
</launch>

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

Comments

Pls look at prior answers and note the things that you have tried: https://answers.ros.org/question/2245...

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

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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 52 times

Last updated: Dec 09 '21