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

roslaunch command is not running

asked 2020-08-23 15:05:34 -0500

HASSAN ISMAIL gravatar image

updated 2020-08-24 02:17:22 -0500

gvdhoorn gravatar image

I created the package my_package inside the SRC folder and then i make a launch folder. In launch folder i make a launch file name name.launch then when i run the command

roslaunch my_package name.launch

when i pressed enter the following error occurred.

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

I tried starting rosrun in other terminal and then run the command roslaunch but still the same error is showing

edit retag flag offensive close merge delete

Comments

If you made your code by using cpp or py, you should modify CMake file.

cpp : http://wiki.ros.org/ROS/Tutorials/Wri...

py : http://wiki.ros.org/ROS/Tutorials/Wri...

Ray_Shim gravatar image Ray_Shim  ( 2020-08-23 22:34:54 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2020-08-23 18:20:05 -0500

Geoff gravatar image

You need to build and then source your workspace before rosrun and roslaunch will be able to find files inside your packages. Follow these tutorials to understand the basics of how workspaces are created and used in ROS 1:

  1. http://wiki.ros.org/catkin/Tutorials/...
  2. http://wiki.ros.org/catkin/Tutorials/...
  3. http://wiki.ros.org/catkin/Tutorials/...
edit flag offensive delete link more

Comments

When you create a package you can do it with catkin_create_pkg <package_name> <package_dependencies> and do it inside the SRC folder. Then go to your catking folder through terminal and use catkin_make or catkin_make_isolated or catkin_build to build the package. Then you should be able to launch your code.

Also make sure to go to your carkin_ws and do source devel/setup.bash .

@Geoff answer is very helpful, although tutorials can be difficult sometimes.

MrRivi gravatar image MrRivi  ( 2020-08-24 05:46:26 -0500 )edit
1

answered 2020-08-24 05:34:30 -0500

WhilteShad0w gravatar image

Please navigate to your source directory and execute following commands:

  1. catkin_make
  2. source devel/setup.bash
edit flag offensive delete link more
0

answered 2020-09-06 13:44:25 -0500

HumbleBee gravatar image
  1. Navigate to your catkin workspace dir (e.g: cd catkin_ws) which contains the src dir
  2. run catkin_make (required once)
  3. run source devel/setup.bash
  4. run roslaunch my_package name.launch [add any required parameters]
edit flag offensive delete link more
0

answered 2020-08-23 23:53:59 -0500

wjh731 gravatar image

$: source devel/setup.bash $: roslauch my_package name.launch

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-08-23 15:05:34 -0500

Seen: 1,306 times

Last updated: Aug 24 '20