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

How to run launch file with many packages

asked 2019-03-06 14:05:23 -0500

Filip4 gravatar image

updated 2019-03-07 04:25:40 -0500


i wrote launch file which use some different packages and i want to do one file which contains folders with this packages and folder "launch", where this launch file exist (3 folders with packages + 1 folder with launch files). I cant run this launch file cause i got error:

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

I was trying with catkin_make and source devel/setup.bash. Can someone tell me how can I do it correctly?


 <arg name="tag" default="1" />
 <group if="$(eval tag == 1)">
 <include file="$(find package_name)/launch/launch_file_name.launch"/>

<group if="$(eval tag == 2)"> 
<include file="$(find package_name)/launch/launch_file_name.launch"/>

output of rospack find tag_detector_ros:

[rospack] Error: package 'tag_detector_ros' not found

output of find $(rospack find tag_detector_ros) -name *.launch:

[rospack] Error: package 'tag_detector_ros' not found
edit retag flag offensive close merge delete



Can someone tell me how can I do it correctly?

WIthout seeing the launchfile? No.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 14:09:28 -0500 )edit

Just a simple launchfile with including others launchfile (from this additional packages). Even if launch file is empty error occurs. Added launchfile code on main post.

Filip4 gravatar image Filip4  ( 2019-03-06 15:54:58 -0500 )edit

Please also show us the exact steps you perform (building workspace, sourcing it and invoking roslaunch).

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 15:56:08 -0500 )edit

catkin_make -> source devel/setup.bash -> roslaunch package_name launch_file_name

Filip4 gravatar image Filip4  ( 2019-03-06 15:59:05 -0500 )edit

That is paraphrasing. Exact commands mean: copy-paste.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-06 15:59:59 -0500 )edit

catkin_make, source devel/setup.bash, roslaunch tag_detector_ros allTags.launch

Filip4 gravatar image Filip4  ( 2019-03-06 16:04:53 -0500 )edit

What is the output of rospack find tag_detector_ros and find $(rospack find tag_detector_ros) -name *.launch?

gvdhoorn gravatar image gvdhoorn  ( 2019-03-07 04:06:32 -0500 )edit

Added on main post

Filip4 gravatar image Filip4  ( 2019-03-07 04:24:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-07 04:50:43 -0500

gvdhoorn gravatar image

updated 2019-03-07 05:22:17 -0500

[rospack] Error: package 'tag_detector_ros' not found

well it would seem that 'tag_detector_ros' is just not a package in your workspace, and looking at the output of the find command, it would appear to actually be a directory, containing other ROS pkgs (ie: aruco_ros, apriltags2_ros, visp_auto_tracker, etc).

roslaunch can only launch launchfiles from actual ROS packages, or if you don't have a package, you can provide it with an absolute path to a launch file.

In your case using the latter option would probably be possible. Something like this should work (provided there are no problems with the launch file itself):

roslaunch /path/to/your/catkin_ws/src/tag_detector_ros/launch/allTags.launch
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2019-03-06 14:05:23 -0500

Seen: 1,304 times

Last updated: Mar 07 '19