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

Invalid roslaunch XML syntax

asked 2016-01-19 06:12:08 -0500

blane gravatar image

updated 2016-01-19 06:21:35 -0500

gvdhoorn gravatar image

Hi guys, I am unable to use the following launch file without getting "Invalid roslaunch XML syntax". Any suggestions? (I'm a novice) Thanks in advance.

<launch>
  <!-- Visualization and SLAM nodes use same data, so just subscribe once and relay messages -->
  <node name="odom_relay" type="relay" pkg="topic_tools" args="/base_controller/odom /base_controller/odom_relay" />
  <node name="scan_relay" type="relay" pkg="topic_tools" args="/base_scan /base_scan_relay" />
  <node name="camera_info_relay" type="relay" pkg="topic_tools" args="/camera/data_throttled_camera_info /camera/data_throttled_camera_info_relay" />
  <node name="republish_rgb" type="republish" pkg="image_transport" args="theora in:=/camera/data_throttled_image raw out:=/camera/data_throttled_image_relay" />
  <node name="republish_depth" type="republish" pkg="image_transport" args="compressedDepth in:=/camera/data_throttled_image_depth raw out:=/camera/data_throttled_image_depth_relay" />

  <!-- SLAM client side -->
  <!-- args: "delete_db_on_start" and "udebug" -->
  <group ns="rtabmap">
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
          <param name="frame_id" type="string" value="base_link"/>

          <param name="subscribe_depth" type="bool" value="true"/>
          <param name="subscribe_laserScan" type="bool" value="true"/>

          <remap from="odom" to="/base_controller/odom_relay"/>
          <remap from="scan" to="/base_scan_relay"/>

          <remap from="rgb/image" to="/camera/data_throttled_image_relay"/>
          <remap from="depth/image" to="/camera/data_throttled_image_depth_relay"/>
          <remap from="rgb/camera_info" to="/camera/data_throttled_camera_info_relay"/>

          <param name="queue_size" type="int" value="10"/>

          <!-- RTAB-Map's parameters -->
          <param name="RGBD/PoseScanMatching" type="string" value=“true”/>
          <param name="RGBD/LocalLoopDetectionSpace" type="string" value="true"/>
          <param name="LccIcp/Type" type="string" value="2"/>
          <param name="LccBow/MinInliers" type="string" value="5"/>
          <param name="LccBow/InlierDistance" type="string" value="0.1"/>
          <param name="RGBD/AngularUpdate" type="string" value="0.01"/>
          <param name="RGBD/LinearUpdate" type="string" value="0.01"/>
          <param name="Rtabmap/TimeThr" type="string" value="700"/>
          <param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
    </node>

  <node pkg="rviz" type="rviz" name="rviz"/>

  <!-- Construct point cloud of the latest throttled data -->
  <node pkg="nodelet" type="nodelet" name="points_xyzrgb" args="load rtabmap/point_cloud_xyzrgb standalone_nodelet">
    <remap from="rgb/image"       to="/camera/data_throttled_image_relay"/>
    <remap from="depth/image"     to="/camera/data_throttled_image_depth_relay"/>
    <remap from="rgb/camera_info" to="/camera/data_throttled_camera_info_relay"/>
    <remap from="cloud"           to="voxel_cloud" />

    <param name="queue_size" type="int" value="10"/>
    <param name="voxel_size" type="double" value="0.01"/>
  </node>
</launch>

http://wiki.ros.org/rtabmap_ros/Tutor...

edit retag flag offensive close merge delete

Comments

Please add your version of ROS, what OS you're running, what version, how you installed ROS, etc.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-19 06:22:13 -0500 )edit

1 Answer

Sort by » oldest newest most voted
4

answered 2016-01-19 10:55:31 -0500

imcmahon gravatar image

updated 2016-01-19 10:58:33 -0500

There are many tools out there to validate XML. I've used the xmllint commandline tool to some success. Assuming your launchfile is foobar.launch, it produces this output:

$ xmllint foobar.launch
foobar.launch:28: parser error : AttValue: " or ' expected
      <param name="RGBD/PoseScanMatching" type="string" value=“true”/>
                                                              ^
foobar.launch:28: parser error : attributes construct error
      <param name="RGBD/PoseScanMatching" type="string" value=“true”/>
                                                              ^
foobar.launch:28: parser error : Couldn't find end of Start Tag param line 28
      <param name="RGBD/PoseScanMatching" type="string" value=“true”/>
                                                              ^
foobar.launch:51: parser error : Opening and ending tag mismatch: group line 11 and launch
     </launch>
     ^
foobar.launch:52: parser error : Premature end of data in tag launch line 1
^

Based on that, it looks like you have some weird characters instead of double quotes (") around your value attributes, and you appear to be missing the end tag of your group (<group ns="rtabmap">) which would be </group>.

edit flag offensive delete link more

Comments

Thank you! Solved the issue.

blane gravatar image blane  ( 2016-01-22 08:20:22 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-01-19 06:12:08 -0500

Seen: 3,353 times

Last updated: Jan 19 '16