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

.launch extension actually becoming a plain text file instead of a .launch file...

asked 2018-06-29 09:03:15 -0500

johnwsmithv gravatar image

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!

edit retag flag offensive close merge delete



Is it possible that you just wonder why your text-editor does not apply xml-highlighting if you open a launch file?

NEngelhard gravatar image NEngelhard  ( 2018-06-29 09:22:59 -0500 )edit

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?

johnwsmithv gravatar image johnwsmithv  ( 2018-06-29 10:23:11 -0500 )edit

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...

BryceWilley gravatar image BryceWilley  ( 2018-06-29 11:34:25 -0500 )edit

so it just "becomes a plain text file." If you actually run the launch file with roslaunch then it will work.

BryceWilley gravatar image BryceWilley  ( 2018-06-29 11:35:27 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-30 13:16:19 -0500

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.

edit flag offensive delete link more



"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

nullspace gravatar image nullspace  ( 2020-09-10 09:04:59 -0500 )edit

Did this problem get solved? I am facing the same problem.

DumbleDuck gravatar image DumbleDuck  ( 2022-08-06 15:31:14 -0500 )edit

Question Tools

1 follower


Asked: 2018-06-29 09:03:15 -0500

Seen: 616 times

Last updated: Jun 30 '18