I don't know why it shows "Invalid roslaunch XML syntax: no element found: line 1, column 0"

ROS BASICS IN 5 DAYS
2 - Ros basic
Example 1.6
The results show as in the picture.

How can I fix it?

Hi @6170434021,
check you launch file. XML does not allow whitespace to appear before the XML declaration (the <?xml .... ?> part). Remove this before parsing.

OK, Thank a lot, It works to me
but… I have a new problem.

I came back to try typing “roslaunch my_package my_package_launch_file.launch” again.

It shown "ROS_MASTER_URI=http://master:11311

“ERROR: cannot launch node of type [my_package/simple.py]:
can’t locate node [simple.py] in package [my_package]”

No processes to monitor
shutting down processing monitor…
… shutting down processing monitor complete"

And I try typing “ls -la” and add permissions.

But it still shows “ERROR: cannot launch node of type [my_package/simple.py]: can’t locate node [simple.py] in package [my_package]”

I don’t know what to do… :frowning:
thank you for helping me sir.

Is it possible to keep the simple.py file in the wrong place?

try chmod +x for the file

It doesn’t work to me, sir. TT

Just humor me and try it with ‘+x’

1 Like

I’m so sorry.
It’s X “X is letter not the numbers shown in the preview”

Did you build your package and source the setup.bash?