cannot launch node of type [A/B]: can't locate node B in package A
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:
- http://answers.ros.org/question/20001...
- http://answers.ros.org/question/20089...
- http://answers.ros.org/question/19470...
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.
Hello, did you: source the bashrc file after editing it? Try running on the console: source .bashrc
Yes I did. And as stated above, it finds the other packages, but just not this one. I also tried a clean build...
The other thing to add to your question is the output of
catkin_find --without-underlays --libexec --share packageA
.You should create an answer and accept it or accept my answer. (I converted the relevant comment to an answer).