rosrun cannot find executables.
I realize this question has been asked to death, but when running rosrun raspicam raspicam_node
I get the message [rosrun] Couldn't find executable named raspicam_node below /opt/ros/indigo/share/raspicam
.
I am running Raspbian jessie on a Raspberry Pi 2 with ROS Indigo. catkin_make_isolated was used to build the workspace. I placed the following lines in .bashrc:
source /opt/ros/indigo/setup.bash
export ROS_PACKAGE_PATH=/home/pi/ros_catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
export ROS_WORKSPACE=/home/pi/ros_catkin_ws
Prior to running rosrun
, I enter the ros_catkin_ws directory and input source devel_isolated/setup.bash
The executable exists under ros_catkin_ws/devel_isolated/raspicam/lib/raspicam
.
If I move the executable to ros_catkin_ws/src/raspicam/src
, everything works fine, but I would rather it work without manually moving files.
Output of echo $ROS_PACKAGE_PATH
Before sourcing: /home/pi/ros_catkin_ws/src:/opt/ros/indigo/share:/opt/ros/indigo/stacks
after sourcing: /home/pi/ros_catkin_ws/src/image_transport_plugins/theora_image_transport:/opt/ros/indigo/share:/opt/ros/indigo/stacks
You can try
source devel_isolated/setup.bash --extend
instead. Without the extend flag, the last sourced file overwrites all of the previously loaded ones.If that does not help, please, edit your question and append the output of
echo $ROS_PACKAGE_PATH
after you source your workspace. And another thing - is the executable a Python script? If so, they have custom handling that allows you to run files directly from the source space.I added the output of echo
echo $ROS_PACKAGE_PATH
before and after sourcing. This is clearly a problem. The script is c++ not Python.I think the
.bashrc
lines are not correct. Trysource /opt/ros/indigo/setup.bash; source /home/pi/ros_catkin_ws/devel/setup.bash --extend;
and do NOT manually setROS_PACKAGE_PATH
norROS_WORKSPACE
. And also make sure you've built your workspace withcatkin_make
and try in a new terminal.