Ask Your Question
1

How do I create a launch file? [closed]

asked 2014-08-12 09:43:28 -0600

HelpwithUbuntu gravatar image

updated 2014-08-12 09:45:52 -0600

The tutorials says ""Now let's create a launch file called turtlemimic.launch and paste the following: "" How do I create a launch file?

In the package, create a folder by the name launch and create a filename.launch file.

How do I create this file?

write the launch file in gedit and save it with a .launch extension ! was that your issue ?

If this is how you do it then how do I use gedit, I don't see gedit on the dashboard.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by HelpwithUbuntu
close date 2014-08-14 07:22:51.429809

3 Answers

Sort by ยป oldest newest most voted
3

answered 2014-08-12 09:54:31 -0600

bvbdort gravatar image

updated 2014-08-12 11:31:16 -0600

Install gedit , gedit is editor, you can use any editor which you like.

sudo apt-get install gedit

just create a empty document and rename it with .launch extension and write your content.

edit flag offensive delete link more

Comments

I have gedit already installed, I don't understand " Rename it with .launch extension"?

HelpwithUbuntu gravatar imageHelpwithUbuntu ( 2014-08-14 06:30:56 -0600 )edit

I copy pasted the line, 1 <launch> 2 3 <group ns="turtlesim1"> 4 <node pkg="turtlesim" name="sim" type="turtlesim_node"/> 5 </group> 6 7 <group ns="turtlesim2"> 8 <node pkg="turtlesim" name="sim" type="turtlesim_node"/> 9 </group> 10 11 <node pkg="turtlesim" name="mimic" type="mimic"> 12 <remap from="input" to="turtlesim1/turtle1"/> 13 <remap from="output" to="turtlesim2/turtle1"/> 14 </node> 15 16 </launch>

I saved it to home/pc/catkin_ws/src/beginner_tutorials/launch but it said I didnt have permission so I sudo it and it saved then but its not an xml file its a plain text file,

HelpwithUbuntu gravatar imageHelpwithUbuntu ( 2014-08-14 06:50:14 -0600 )edit

the last line was without using gedit. launch file is a plan text file with xml syntax. What is the error ur getting while using launch file ?

bvbdort gravatar imagebvbdort ( 2014-08-14 07:17:29 -0600 )edit

pc@pc:~$ cd ~/catkin_ws/ pc@pc:~/catkin_ws$ source devel/setup.bash pc@pc:~/catkin_ws$ roslaunch beginner_tutorials turtlemimic.launch ... logging to /home/pc/.ros/log/93f61492-23a7-11e4-bf9f-9439e5ec40e7/roslaunch-pc-3090.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

Invalid roslaunch XML syntax: syntax error: line 1, column 3I

HelpwithUbuntu gravatar imageHelpwithUbuntu ( 2014-08-14 07:18:34 -0600 )edit

What do you mean the last line is without using gedit?

HelpwithUbuntu gravatar imageHelpwithUbuntu ( 2014-08-14 07:20:57 -0600 )edit

i think you copied line numbers also. it should be like this http://answers.ros.org/question/19019...

bvbdort gravatar imagebvbdort ( 2014-08-14 07:31:09 -0600 )edit
0

answered 2014-08-12 10:19:12 -0600

richa gravatar image

Use any editor - emacs/vim/nano from the terminal or gedit, copy and paste the content from the tutorial and save the file as turtlemimic.launch

edit flag offensive delete link more

Comments

I did this and it saved as plain text and did not work.

HelpwithUbuntu gravatar imageHelpwithUbuntu ( 2014-08-14 07:07:07 -0600 )edit
0

answered 2014-08-12 10:06:20 -0600

Wolf gravatar image

If it's not in the launcher just type gedit in a terminal....

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-12 09:43:28 -0600

Seen: 2,150 times

Last updated: Aug 12 '14