Ask Your Question

How to solve '[rosrun] Couldn't find executable named ...'?

asked 2015-11-05 00:54:56 -0500

ChenJinluo gravatar image

Ubuntu 12.04

ROS Hydro

I am a freshman to ROS, recently I create nodes according to the book ‘Learning ROS for Robotics Programing Second Edition’,

but after I execute ‘rosrun’, something strange happend:

rosrun chapter2_tutorials chap2_example1_a

It shows that:

[rosrun] Couldn't find executable named chap2_example1_a below /home/exbot/dev/catkin_ws/src/chapter2_tutorials

Actually, the executable chap2_example1_a exists in /home/dev/catkin_ws/devel/lib

I think something is wrong with the path. But I am not sure.

How to solve it? Thank you~

edit retag flag offensive close merge delete


Can you show us the output of catkin config? Perhaps you need to sudo apt-get install python-catkin-tools for that.

Do you have multiple catkin workspaces on your machine?

Dimitri Schachmann gravatar image Dimitri Schachmann  ( 2015-11-05 16:07:50 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2015-11-05 03:00:54 -0500

Dimitri Schachmann gravatar image

Most probably you need to source devel/setup.bash

see here for similar question

edit flag offensive delete link more


Thanks. But it doesn't help. In the end of my ~./bashrc, I already have export ROS_PACKAGE_PATH=~/dev/catkin_ws:/home/exbot/rosbuild_ws/sandbox:/home/exbot/catkin_ws/src:/opt/ros/hydro/share:/opt/ros/hydro/stacks If I add source /opt/ros/hydro/setup.bash in the end. It even can't find

ChenJinluo gravatar image ChenJinluo  ( 2015-11-05 05:57:52 -0500 )edit

my package. [rospack] Error: stack/package chapter2_tutorials not found

ChenJinluo gravatar image ChenJinluo  ( 2015-11-05 05:58:33 -0500 )edit

Don't set ROS_PACKAGE_PATH yourself, let setup.bash of the appropriate workspace do that. Remove that line (export ROS_PACKAGE_PATH=..), and change source /opt/ros/hydro/setup.bash to source the setup.bash from your workspace (ie: devel/setup.bash). Then open new terminal, and try again.

gvdhoorn gravatar image gvdhoorn  ( 2015-11-06 03:45:11 -0500 )edit

It works! Thanks a lot ^ ^

ChenJinluo gravatar image ChenJinluo  ( 2015-11-06 19:32:22 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-04 23:33:55 -0500

Seen: 7,420 times

Last updated: Nov 05 '15