Ask Your Question
0

Launch file error

asked 2017-09-24 16:20:39 -0500

jason gravatar image

updated 2017-09-24 16:36:57 -0500

Hello, I modified other's launch file to add my own parameters in the code. First is the new launch file

<?xml version="1.0"?>
<launch>
<arg name="uri" default="radio://0/80/250K" />
<arg name="frame" default="/crazyflie" />
<arg name="joy_dev" default="/dev/input/js0" />
<arg name="x" default="3" />
<arg name="y" default="0" />
<arg name="z" default="0" />
<arg name="x2" default="0.9" />
<include file="$(find crazyflie_driver)/launch/crazyflie_server.launch">
</include>

<group ns="crazyflie">
<include file="$(find crazyflie_driver)/launch/crazyflie_add.launch">
  <arg name="uri" value="$(arg uri)" />
  <arg name="tf_prefix" value="crazyflie" />
  <arg name="enable_logging" value="True" />
</include>
<node name="joy" pkg="joy" type="joy_node" output="screen">
  <param name="dev" value="$(arg joy_dev)" />
</node>

<node name="joystick_controller" pkg="crazyflie_demo" type="controller.py" output="screen">
  <param name="use_crazyflie_controller" value="True" />
</node>

<include file="$(find crazyflie_controller)/launch/crazyflie2.launch">
  <arg name="frame" value="$(arg frame)" />
  <param name="x2"    value="$(arg x2)" />
</include>

<node name="pose" pkg="crazyflie_demo" type="publish_pose.py" output="scree$
  <param name="name" value="goal" />
  <param name="rate" value="30" />
  <param name="x" value="$(arg x)" />
  <param name="y" value="$(arg y)" />
  <param name="z" value="$(arg z)" />
</node>
<node pkg="tf" type="static_transform_publisher" name="baselink_broadcaster" args="0 0 0 0 0 0 1 $(arg frame) /crazyflie/base_link 100" />
</group>

<!-- run vicon bridge -->
<include file="$(find mocap_optitrack)/launch/mocap.launch"/>

<!-- run rviz -->
<param name="robot_description" command="$(find xacro)/xacro.py $(find crazyflie_description)/urdf/crazyflie.urdf.xacro" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find crazyflie_demo)/launch/crazyflie_pos.rviz" required="true" />

</launch>

And the error

Invalid roslaunch XML syntax: not well-formed (invalid token): line 35, column 6 The traceback for the exception was written to the log file

Line 35, is<param name="name" value="goal" /> The launch I modified is all the parts related to "x2", the new parameter I need in the modified code. So I don't think it is the "line 35 column 6" which I didn't change cause the error. Does anyone have any idea how to solve this? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-09-24 18:16:52 -0500

jayess gravatar image

updated 2017-09-24 18:24:24 -0500

The error tells you what the problem is and where to find it.

Invalid roslaunch XML syntax: not well-formed (invalid token):

tells you that there is something wrong with the XML syntax of your file.

line 35, column 6 The traceback for the exception was written to the log file

tells you that the problem is at approximately line 35. Many times errors come before where you're told the error is. In this case it's at line 32 where you have a malformed node tag.

Change

<node name="pose" pkg="crazyflie_demo" type="publish_pose.py" output="scree$

to

<node name="pose" pkg="crazyflie_demo" type="publish_pose.py" output="screen">

Notice how I added the missing quotation mark and closing > and changed $ to n.

edit flag offensive delete link more

Comments

Thanks. I have no idea how could I make this mistake with "copy" and "paste". Anyway, thank you very much.

jason gravatar imagejason ( 2017-09-24 18:39:11 -0500 )edit

No problem. Glad to help.

jayess gravatar imagejayess ( 2017-09-24 18:40:01 -0500 )edit
1

@jason: the $ is typically used by text-based/console editors to indicate that the line is longer than the width of the text editor window. If you then copy-paste using mouse selection, you copy incomplete lines.

gvdhoorn gravatar imagegvdhoorn ( 2017-09-25 03:07:24 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-09-24 16:20:39 -0500

Seen: 897 times

Last updated: Sep 24 '17