Invalid token

asked 2020-04-26 13:07:32 -0600

Bujar gravatar image

updated 2020-04-27 08:28:46 -0600

gvdhoorn gravatar image

Hi,I'm trying to start one of the downloaded project and i have this error when I`m starting launch file, I'm new in ROS and in Python too. What can i do with this?. Thank you for the help

Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 245, in main
    args = rlutil.resolve_launch_arguments(args)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/rlutil.py", line 92, in resolve_launch_arguments
    resolved = roslib.packages.find_resource(args[0], args[1])
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslib/packages.py", line 519, in find_resource
    pkg_path = rospack.get_path(pkg)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 205, in get_path
    self._update_location_cache()
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 188, in _update_location_cache
    list_by_path(self._manifest_name, path, cache)
  File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 71, in list_by_path
    root = ElementTree(None, os.path.join(d, PACKAGE_FILE))
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 611, in __init__
    self.parse(file)
  File "<string>", line 38, in parse
ParseError: not well-formed (invalid token): line 8, column 41
I tried to use 2 .launch files from different projects. That's the first one, before 1 week it was good and everything works. In every file i have <launch> and </launch> on the end, i don't know why forum delete this from post

<launch>

    <param name = "sensor_name" value = "Humidity Temperature sensor"/>
    <param name = "sensor_id" value = "1"/>

    <node pkg = "ros_basics" type = "Sensor_publisher.py" name = "publisher" output = "screen" />

    <node pkg = "ros_basics" type = "Sensor_listener.py" name = "listeners" output = "screen" />

</launch>

That's second file, that is i download with one of the projects from GitHub

<?xml version="1.0"?>
<launch>



    <include file="$(find gazebo_demo)/launch/gazebo_demo_world.launch" />

    <include file="$(find gazebo_demo)/launch/put_robot_in_world.launch" />

    <include file="$(find gazebo_demo)/launch/hector_slam.launch" />

    <include file="$(find gazebo_demo)/launch/object_map.launch" />

    <include file="$(find gazebo_demo)/launch/object_yaml.launch" />

    <include file="$(find gazebo_demo)/launch/joystick.launch" />



</launch>
edit retag flag offensive close merge delete

Comments

1

Without seeing your .launch file no one is going to be able to say anything more than: there is a character at line 8, column 41 which is not valid XML.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-27 04:38:43 -0600 )edit

I triedto use 2 .launch files different projects. I will add now code ffrom this files

Bujar gravatar image Bujar  ( 2020-04-27 07:44:18 -0600 )edit
1

Please add the exact command line you use the start everything and clarify which of these .launch files caused the error you showed earlier.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-27 08:30:16 -0600 )edit

I start this with roslaunch ros_basics sensor_com.launch for the first file and roslaunch gazebo_demo demo.launch for the second . For both i have the same output

Bujar gravatar image Bujar  ( 2020-04-27 08:37:48 -0600 )edit