Ask Your Question
0

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

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

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

Comments

1

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

NEngelhard gravatar imageNEngelhard ( 2018-06-29 09:22:59 -0600 )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 imagejohnwsmithv ( 2018-06-29 10:23:11 -0600 )edit
1

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 imageBryceWilley ( 2018-06-29 11:34:25 -0600 )edit

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

BryceWilley gravatar imageBryceWilley ( 2018-06-29 11:35:27 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 344 times

Last updated: Jun 30 '18