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

Invalid roslaunch XML syntax: mismatched tag: line 7, column 4

asked 2018-06-02 20:20:33 -0500

Swag10 gravatar image

I am using kinetic version of ROS. I am a very new user to ROS. So I was trying to write a launch code that would launch two different launch files. One launch file is of husky_gazebo package, the other one is for teleop_twist_keyboard package. I am not sure if I can write a code that can launch these files together. For my launch file I am getting following error:

Invalid roslaunch XML syntax: mismatched tag: line 7, column 4

below is my launch file:

<launch>

<include file="$(find husky_gazebo)/launch/husky_empty_world.launch">
<arg name="world_name" value="$(find gazebo-7)/worlds/robocup14_spl_field.world">
<arg name="laser_enabled" value="$(arg laser_enabled)"/>
<arg name="kinect_enabled" value="$(arg kinetic_enabled)"/>
</include>

<include file="$(find teleop_twist_keyboard)/teleop_twist_keyboard.py">
</include>

</launch>
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
5

answered 2018-06-02 20:52:23 -0500

jayess gravatar image

updated 2021-09-30 18:56:29 -0500

You need to change your first <arg> tag to be a self-closing tag <arg/>:

<arg name="world_name" value="$(find gazebo-7)/worlds/robocup14_spl_field.world"/>

Also, the <include> tag is for including other XML files: Check out the documentation:

The <include> tag enables you to import another roslaunch XML file into the current file...

You want to use the <node> tag instead to launch that node:

<node name="teleop_twist_keyboard" pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py"/>

So, your final launch file will look like

<launch>

<include file="$(find husky_gazebo)/launch/husky_empty_world.launch">
<!-- this tag below -->
<arg name="world_name" value="$(find gazebo-7)/worlds/robocup14_spl_field.world"/>
<arg name="laser_enabled" value="$(arg laser_enabled)"/>
<arg name="kinect_enabled" value="$(arg kinetic_enabled)"/>
</include>

<node name="teleop_twist_keyboard" pkg="teleop_twist_keyboard" type="teleop_twist_keyboard.py"/>

</launch>

Please see the documentation for the <node> tag.

edit flag offensive delete link more

Comments

Oh so sorry. It was a silly mistake. It is working now. Thanks a lot.

Swag10 gravatar image Swag10  ( 2018-06-04 16:44:21 -0500 )edit
0

answered 2018-06-02 20:43:30 -0500

achmad_fathoni gravatar image

updated 2018-06-02 20:48:20 -0500

Change

<arg name="world_name" value="$(find gazebo-7)/worlds/robocup14_spl_field.world">

to

<arg name="world_name" value="$(find gazebo-7)/worlds/robocup14_spl_field.world"/>
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-06-02 20:20:33 -0500

Seen: 7,902 times

Last updated: Sep 30 '21