Ask Your Question
0

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

Hi,

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?

LaunchFile:

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

<group if="$(eval tag == 2)"> 
<include file="$(find package_name)/launch/launch_file_name.launch"/>
</group> 
</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
./src/image_pipeline/stereo_image_proc/launch/stereo_image_proc.launch
./src/image_pipeline/image_proc/launch/image_proc.launch
./src/usb_cam/launch/usb_cam-test.launch
./src/tag_detector_ros/aruco_ros/aruco_ros/launch/aruco_marker_finder_kinect.launch
./src/tag_detector_ros/aruco_ros/aruco_ros/launch/double.launch
./src/tag_detector_ros/aruco_ros/aruco_ros/launch/marker_publisher.launch
./src/tag_detector_ros/apriltags2_ros/apriltags2_ros/launch/continuous_detection.launch
./src/tag_detector_ros/apriltags2_ros/apriltags2_ros/launch/single_image_client.launch
./src/tag_detector_ros/apriltags2_ros/apriltags2_ros/launch/single_image_server.launch
./src/tag_detector_ros/launch/allTagsTogether.launch
./src/tag_detector_ros/launch/allTags.launch
./src/tag_detector_ros/vision_visp/visp_auto_tracker/launch/tracklive_usb.launch
./src/tag_detector_ros/vision_visp/visp_auto_tracker/launch/tracklive_usb_dataMatrix.launch
./src/tag_detector_ros/vision_visp/visp_auto_tracker/launch/tracklive_firewire.launch
./src/tag_detector_ros/vision_visp/visp_auto_tracker/launch/tutorial.launch
./src/tag_detector_ros/vision_visp/visp_camera_calibration/launch/lagadic_grid.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/start.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/flea2/config.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/flea2/camera-nodelet.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/hrp2014/config.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/hrp2014/camera.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/hrp2014/camera-nodelet.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/hrp2014/image_pipeline.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/tutorial-multi.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/tutorial-nodelet.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/tutorial.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/uvc/config.launch
./src/tag_detector_ros/vision_visp/visp_tracker/launch/uvc/camera-nodelet.launch
edit retag flag offensive close merge delete

Comments

1

Can someone tell me how can I do it correctly?

WIthout seeing the launchfile? No.

gvdhoorn gravatar imagegvdhoorn ( 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 imageFilip4 ( 2019-03-06 15:54:58 -0500 )edit
1

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

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

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

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

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

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

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

Filip4 gravatar imageFilip4 ( 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 imagegvdhoorn ( 2019-03-07 04:06:32 -0500 )edit

Added on main post

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

1 Answer

Sort by ยป oldest newest most voted
1

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

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: 2019-03-06 14:05:23 -0500

Seen: 88 times

Last updated: Mar 07