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

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

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

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 -0600 )edit

1 Answer

Sort by » oldest newest most voted

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

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 -0600 )edit

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

ChenJinluo gravatar image ChenJinluo  ( 2015-11-05 05:58:33 -0600 )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 -0600 )edit

It works! Thanks a lot ^ ^

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

Question Tools

1 follower


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

Seen: 8,772 times

Last updated: Nov 05 '15