ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
0

cannot launch node of type [A/B]: can't locate node B in package A

asked 2015-01-15 06:06:13 -0500

cbandera gravatar image

updated 2015-01-21 04:51:52 -0500

Hello,

I have this strange problem, where ROS seems not to be able to find my executables. I have a catkin workspace with several packages. Using catkin_make, all of them are being built. I source the devel/setup.bash file in my ~/.bashrc I am using ROS indigo on Ubuntu 14.04

Upon launching a .launch file, most of the nodes start just fine, but for all nodes of one explicit package I get the error:

ERROR: cannot launch node of type [packageA/nodeB]: can't locate node [nodeB] in package [packageA]

Now, I have sourced the devel/setup.bash file, I can roscd packageA and find . -executable shows me the subdirectories.

Using rosrun packageA nodeB gives me

[rosrun] Couldn't find executable named preprocessing below /home/user/catkin_ws/src/packageA

[rosrun] Found the following, but they're either not files,

[rosrun] or not executable:

[rosrun] /home/user/catkin_ws/src/packageA/src/nodeB

Thoughts:

  • My setup is: catkin_ws/src/packageA/src/nodeB/nodeB.cpp <- could the subdirectory be a problem? But I am pointing catkin to the right directory in the CMakeListis.cpp
  • I am sourcing 2 workspaces. The second one with the --extend Flag. <- is this possibly a source for trouble?

Also I don't seem to be the only one with this problem. See:

Does anyone have any hints to what could be going wrong here?

Also, tell me if you need more Information. Thanks

UPDATE Running the command catkin_find --without-underlays --libexec --share perception returns:

/opt/ros/indigo/share/perception

My package is called "perception" might this be a problem? Does it collide with a ros package? But if so, why did it never bring up an error until recently? Running the same command on a different package returns:

/home/user/catkin_ws/devel/lib/navigation

/home/user/catkin_ws/devel/share/navigation

/home/user/catkin_ws/src/navigation

UPDATE2 Ohh... so now I was just playing around a little and commented out the other workspace in my .bashrc (the one with the extend flag). After that, I did a clean build and sourced. Now it's working again. PS: I am using the --extend flag, because I am adding an extra Visualization/Debugging workspace that won't run on the robot but is only used on my machine.

I am trying to reproduce the error now, but uncommenting the other workspace again won't bring up the error anymore. Well anyway, I guess it's resolved for now.

Thanks @William for the help.

edit retag flag offensive close merge delete

Comments

Hello, did you: source the bashrc file after editing it? Try running on the console: source .bashrc

kokirits gravatar imagekokirits ( 2015-01-15 07:36:32 -0500 )edit

Yes I did. And as stated above, it finds the other packages, but just not this one. I also tried a clean build...

cbandera gravatar imagecbandera ( 2015-01-15 08:41:24 -0500 )edit

The other thing to add to your question is the output of catkin_find --without-underlays --libexec --share packageA.

William gravatar imageWilliam ( 2015-01-15 12:47:28 -0500 )edit

You should create an answer and accept it or accept my answer. (I converted the relevant comment to an answer).

William gravatar imageWilliam ( 2015-01-21 12:18:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-01-15 12:40:02 -0500

William gravatar image

Why are you doing the second source with --extend? I think this should work but it might be the source of your problem. Is the package you need in your ROS_PACKAGE_PATH? Can rosrun locate other executables in this package?

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

2 followers

Stats

Asked: 2015-01-15 06:06:13 -0500

Seen: 848 times

Last updated: Jan 21 '15