0
$\begingroup$

Rosanswers logo

Hey guys, I am relatively new to ROS, as i am working with it for my research project. I have been learning fairly quickly on how to navigate through Ubuntu and how to use ROS. I have been working with different things including PID, ros_control, etc, and I have been following tutorials; some of them require me to make a .launch file, simply by making a blank file, and naming it with the .launch extension and copying and pasting the code. When doing all of this, the file does not actually become a .launch file for me, it becomes a plain text file... I did the same thing when creating a .xml file, adding that extension and it became a .xml file.

I'm not exactly sure what I am doing wrong. If anyone has a quick solution it would be much appreciated. Thanks!


Originally posted by johnwsmithv on ROS Answers with karma: 3 on 2018-06-29

Post score: 0


Original comments

Comment by NEngelhard on 2018-06-29:
Is it possible that you just wonder why your text-editor does not apply xml-highlighting if you open a launch file?

Comment by johnwsmithv on 2018-06-29:
What do you mean by that? By the way, by xml I meant .yaml...When I try to launch the ".launch" files that I created that aren't actually launch files, it gives me an error obviously. Does anyone else know how I can create a legitimate .launch file?

Comment by BryceWilley on 2018-06-29:
I think what NEngelhard was trying to say is that in Ubuntu, and Linux in general, ASCII text file extensions don't really define the file. In this case, what is most likely happening is that your code editor doesn't know what a *.launch file is, and doesn't apply highlighting...

Comment by BryceWilley on 2018-06-29:
so it just "becomes a plain text file." If you actually run the launch file with roslaunch then it will work.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

As has been mentioned above: A launch file is simply a plain text file which contains valid XML code with valid launch file tags. By convention its file name should end in ".launch" but this is not strictly necessary for it to work.

You say you get an error when you try and launch the file you've made if you can let us know what that error message is, the command you run that produces it and the detail of the launch file you've tried to make. If we know all this then we can help you solve this problem.


Originally posted by PeteBlackerThe3rd with karma: 9529 on 2018-06-30

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by nullspace on 2020-09-10:
"RLException: [rviz.launch] is neither a launch file in package [mrm_desctription] nor is [mrm_desctription] a launch file name The traceback for the exception was written to the log file"

sir I am too facing similar issue but i getting confusion how to convert text file to xml (adding .xml) but launch file should end with .launch but how to add both extension, and i have no idea why i am getting this error ,please anyone help i completely stalled at this step

Comment by DumbleDuck on 2022-08-06:
Did this problem get solved? I am facing the same problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.