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

Invalid roslaunch XML syntax: no root <launch> tag

asked 2021-03-31 09:58:48 -0500

harish556 gravatar image

updated 2021-03-31 11:17:56 -0500

I was trying to launch a file and I am getting this error every time, I was trying to use the turtlebot3 map in my different robot. so I copied turtlebot3_house.world to my robot workspace.

<?xml version="1.0" encoding="UTF-8"?>
<launch>
  <include file="$(find robot)/world/turtlebot3_house.world">
  </include>
  <param name="robot_description" command="cat '$(find robot)/urdf/robot.xacro'"/>

  <arg name="x" default="0"/>
  <arg name="y" default="0"/>
  <arg name="z" default="0.5"/>

  <node name="robot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
      args="-urdf -param robot_description -model robot -x $(arg x) -y $(arg y) -z $(arg z)" />

</launch>

my error

RLException: while processing /home/guru/first_robot/catkin_ws/src/robot/world/turtlebot3_house.world:
Invalid roslaunch XML syntax: no root <launch> tag
The traceback for the exception was written to the log file

the launch file which command which I used

roslaunch robot spawn.launch
edit retag flag offensive close merge delete

Comments

Can you provide more description: For example: What command you are running to launch file, the directory structure of your folders, etc.

I think that your launch file is correct, but then also look at this link if this might help you.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-03-31 10:28:08 -0500 )edit

@Ranjit I have just checked that, seems that's not the problem and I have also added command here

harish556 gravatar image harish556  ( 2021-03-31 11:16:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-03-31 11:18:56 -0500

gvdhoorn gravatar image

updated 2021-03-31 11:19:18 -0500

The error is pretty clear:

RLException: while processing /home/guru/first_robot/catkin_ws/src/robot/world/turtlebot3_house.world:
Invalid roslaunch XML syntax: no root <launch> tag

it states there is no root <launch> tag in turtlebot3_house.world, and that's correct.

turtlebot3_house.world is a Gazebo .world file, not a .launch file you can include in another .launch file.

edit flag offensive delete link more

Comments

so, how can i make it a launch file

harish556 gravatar image harish556  ( 2021-03-31 11:22:13 -0500 )edit

You can't. That's not how this works.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-31 11:24:32 -0500 )edit

thanks, i got that

harish556 gravatar image harish556  ( 2021-03-31 11:26:18 -0500 )edit

This tutorial explains how to use a Gazebo world in a launch file.

tryan gravatar image tryan  ( 2021-03-31 11:33:18 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-03-31 09:58:48 -0500

Seen: 444 times

Last updated: Mar 31 '21