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

can't locate node in package

asked 2018-06-05 11:43:15 -0600

rosros7533 gravatar image

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.

edit retag flag offensive close merge delete

Comments

1

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 ...

jarvisschultz gravatar image jarvisschultz  ( 2018-06-05 14:59:29 -0600 )edit

... likely something wrong with your workspace setup.

jarvisschultz gravatar image jarvisschultz  ( 2018-06-05 14:59:42 -0600 )edit

If I do so, do I have to add the other workspaces somewhere in the CMake file?

rosros7533 gravatar image rosros7533  ( 2018-06-05 15:17:14 -0600 )edit

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.

jarvisschultz gravatar image jarvisschultz  ( 2018-06-05 16:10:42 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-06-12 02:58:42 -0600

rosros7533 gravatar image

I overlayed the package the right way, now it works. Actually, I was not sourcing the package in the right order.. Thank you very much for your answers !

edit flag offensive delete link more
0

answered 2018-06-05 14:26:12 -0600

vinaykumarhs2020 gravatar image

Are you sure your ROS_PACKAGE_PATH has both the workspaces? Have you followed catkin workspace overlay steps? (specifically section 3 on chaining workspaces).

Usually, when you source two setup scripts, first one is overwritten by the latter one. That is why you see that executables/packages in the first workspace missing.

edit flag offensive delete link more

Comments

Actually, I don't do overlay. But when I type echo $ROS_PACKAGE_PATH, I can effectively see the two paths... Do I have to do an overlay whatever?

rosros7533 gravatar image rosros7533  ( 2018-06-05 15:15:42 -0600 )edit

Any reason why you need two different workspaces? Since you have two different packages, you can just put them in one workspace. Run catkin_make there and source devel/setup.bash.

vinaykumarhs2020 gravatar image vinaykumarhs2020  ( 2018-06-05 16:43:52 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-05 11:43:15 -0600

Seen: 216 times

Last updated: Jun 12 '18