Ask Your Question
0

How do I create a launch file??

asked 2015-04-07 17:20:26 -0500

Metalzero2 gravatar image

updated 2015-04-07 17:21:01 -0500

I am doing the tutorial now. I am now here at 1.2.2 - 1.2.5 .

I made a file (in the folder that the tutorial says) named turtlemimic.launch (with the code given). But when I run the code I get this error message :

[turtlemimic.launch] is neither a launch file in package [beginner_tutorials] nor is [beginner_tutorials] a launch file name
The traceback for the exception was written to the log file

How do I make a .launch file??

edit retag flag offensive close merge delete

Comments

Can you copy/paste the command that produced that error message?

Morgan gravatar image Morgan  ( 2015-04-07 17:41:43 -0500 )edit

@Morgan I run the command $ roslaunch beginner_tutorials turtlemimic.launch , just as the tutorial says.

Metalzero2 gravatar image Metalzero2  ( 2015-04-07 18:00:01 -0500 )edit

for those who have this problem ([beginner_tutorials] is not a package or launch file name) please follow this tutorial: http://wiki.ros.org/catkin/Tutorials/...

Amer Al-Radaideh gravatar image Amer Al-Radaideh  ( 2017-01-28 01:32:05 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2015-04-07 18:31:05 -0500

This could be happening for a few reasons (I know some of these are obvious, I'm just going through the list of things I try to verify when debugging such a problem):

  1. Have you sourced the devel/setup.bash from your workspace into your current shell ? Otherwise, roslaunch won't know where to look to find the beginner_tutorials files, including turtlemimic.launch you can verify that your current shell knows about the beginner_tutorials location by running rospack list | grep beginner_tutorials and verifying that your package directory shows up in the location you expect.
  2. Is the file named exactly turtlemimic.launch, and is it somewhere in the beginner_tutorials directory tree? Note that if it is somewhere in the workspace (e.g., the workspace root) rather than in the src/beginner_tutorials directory tree, roslaunch will not be able to find it.
  3. Make sure the launch file is valid XML that starts with a launch tag.
edit flag offensive delete link more

Comments

I did check all of that but maybe I was tired and did some mistake some where (had 7 terminals opened :P ). Now that I did everything from the beginning it worked just fine. Thanks for your help :)

Metalzero2 gravatar image Metalzero2  ( 2015-04-08 06:10:10 -0500 )edit

@Morgan I just looked I did again a little better. Do I need to source devel/setup.bash at every new terminal I use?

Metalzero2 gravatar image Metalzero2  ( 2015-04-08 06:14:46 -0500 )edit
1

Yes, every terminal that needs to work with the package(s) you are developing in your workspace needs to source the devel/setup.bash file from the workspace. I will typically set up a bash alias for the most common workspace I'm using, so you can just type "w" or whatever, to make it fast and easy.

Morgan gravatar image Morgan  ( 2015-04-08 11:35:21 -0500 )edit

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: 2015-04-07 17:20:26 -0500

Seen: 6,390 times

Last updated: Apr 07 '15