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

How do I create a launch file? [closed]

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

HelpwithUbuntu gravatar image

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

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

bvbdort gravatar image

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

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 image HelpwithUbuntu  ( 2014-08-14 06:30:56 -0500 )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 image HelpwithUbuntu  ( 2014-08-14 06:50:14 -0500 )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 image bvbdort  ( 2014-08-14 07:17:29 -0500 )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 image HelpwithUbuntu  ( 2014-08-14 07:18:34 -0500 )edit

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

HelpwithUbuntu gravatar image HelpwithUbuntu  ( 2014-08-14 07:20:57 -0500 )edit

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

bvbdort gravatar image bvbdort  ( 2014-08-14 07:31:09 -0500 )edit
0

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

Wolf gravatar image

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

edit flag offensive delete link more
0

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

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 image HelpwithUbuntu  ( 2014-08-14 07:07:07 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 4,087 times

Last updated: Aug 12 '14