0
$\begingroup$

Rosanswers logo

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.


Originally posted by cbandera on ROS Answers with karma: 123 on 2015-01-15

Post score: 0


Original comments

Comment by kokirits on 2015-01-15:
Hello, did you: source the bashrc file after editing it? Try running on the console: source .bashrc

Comment by cbandera on 2015-01-15:
Yes I did. And as stated above, it finds the other packages, but just not this one. I also tried a clean build...

Comment by William on 2015-01-15:
The other thing to add to your question is the output of catkin_find --without-underlays --libexec --share packageA.

Comment by William on 2015-01-21:
You should create an answer and accept it or accept my answer. (I converted the relevant comment to an answer).

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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?


Originally posted by William with karma: 17335 on 2015-01-15

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.