Robotics StackExchange | Archived questions

I was trying to run the example of the tutorial rqt_console and roslaunch and was trying to create and run a launch file in the example regarding turtlesim1 and turtle sim2 and encountered the following error.

Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/init.py", line 225, in main args = rlutil.resolvelauncharguments(args) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslaunch/rlutil.py", line 92, in resolvelauncharguments resolved = roslib.packages.findresource(args[0], args[1]) File "/opt/ros/kinetic/lib/python2.7/dist-packages/roslib/packages.py", line 499, in findresource pkgpath = rospack.getpath(pkg) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 201, in getpath self.updatelocationcache() File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 184, in updatelocationcache listbypath(self.manifestname, path, cache) File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 67, in listbypath root = ElementTree(None, os.path.join(d, PACKAGEFILE)) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in init self.parse(file) File "", line 38, in parse ParseError: junk after document element: line 70, column 2

Asked by hid123 on 2019-11-20 16:36:13 UTC

Comments

@hid123, edit your title so it's shorter and more meaningful and describe the problem in more detail. Which tutorial are you referring to etc.

Asked by l4ncelot on 2019-11-21 09:01:11 UTC

@hid123, according to the error message there should be some error while parsing XML file. Can you provide us with some launch files etc? How do you run the whole thing?

Asked by l4ncelot on 2019-11-21 09:10:54 UTC

@hid123, use the edit button to update your question instead of answering it.

Asked by l4ncelot on 2019-11-24 22:01:28 UTC

This is really weird to me as I cannot see anything wrong with the launch file and my version of turtlesim is working just fine... What operating system do you use and how did you install the ROS distribution?

Asked by l4ncelot on 2019-11-24 22:08:50 UTC

Answers

I am referring to the following tutorial . http://wiki.ros.org/ROS/Tutorials/UsingRqtconsoleRoslaunch

Here is the following xml file as given in the tutorial.

  <group ns="turtlesim1">
    <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
  </group>

  <group ns="turtlesim2">
    <node pkg="turtlesim" name="sim" type="turtlesim_node"/>
  </group>

 <node pkg="turtlesim" name="mimic" type="mimic">
   <remap from="input" to="turtlesim1/turtle1"/>
   <remap from="output" to="turtlesim2/turtle1"/>
 </node>

Asked by hid123 on 2019-11-21 13:12:05 UTC

Comments