can't locate node in package
Hi, I am using Kinetic on Ubuntu 16.04.
I am trying to launch file from different workspaces. Basically, I wrote a workspace evaluation_ws with a package kitti_eval_pkg that contains a launch file eval_rovio.launch which includes an other launch file visualization.launch from a different package rovio in a different workspace rovio_ws. I passed the global path. However, when I try to launch the big launch file eval_rovio.launch, I get the following error:
ERROR: cannot launch node of type [rovio/visualization_node]: can't locate node [visualization_node] in package [rovio]
Here is the launch file from evaluation_ws, eval_rovio.launch:
<launch>
<arg name="rosbag_name" default="V1_01_easy.bag" />
<arg name="results_path" default="/home/cecile/evaluation_ws/src/kitti_eval_pkg/data/ROVIO" />
<include file="/home/cecile/rovio_ws/src/rovio/launch/visualization.launch">
<arg name="rosbag_file" value="$(arg rosbag_name)" />
<arg name="path_results" value="$(arg results_path)" />
</include>
<node pkg="kitti_eval_pkg" type="eval_node" name="evaluation_rovio" output="screen" args="ROVIO $(arg rosbag_name)"></node>
</launch>
I already sourced both rovio_ws and evaluation_ws. Both the path to rovio_ws and evaluation_ws are included in ROS_PACKAGE_PATH. Finally, when I type rosrun and use the tab completion to reach the rovio package, it finds it well, but failed to find the node visualization_node.
Please, could you tell me what to do to deal with this issue? Thanks a lot.
It's probably not a great idea to be providing full paths.... this isn't very portable. I'd recommend using substitution args such as
$(find pkg)
or$(env ENVIRONMENT_VARIABLE)
to find locations of paths. If you are looking for a ROS package and can't find it with$(find)
then there's ...... likely something wrong with your workspace setup.
If I do so, do I have to add the other workspaces somewhere in the CMake file?
If your workspaces are properly overlaid (as mentioned in the anser from @vinaykumarhs202), you shouldn't need to add anything in your CMakeLists.txt. Unless you have a good reason to be managing your project with 2 different workspaces, you might want to consider consolidating into one workspace.