Can't find python scripts after sourcing
package.xml
<package>
<description> knex_ros </description>
<name> knex_ros </name>
<author>jfstepha</author>
<license>BSD</license>
<url>http://ros.org/wiki/kinex_ros</url>
<version> 0.0.0</version>
<maintainer email="andre@note.note">andre</maintainer>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>tf</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>robot_state_publisher</build_depend>
<build_depend>differential_drive</build_depend>
<run_depend>tf</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>robot_state_publisher</run_depend>
<run_depend>differential_drive</run_depend>
</package>
CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(knex_ros)
find_package(catkin REQUIRED COMPONENTS
rospy
std_msgs
tf
roscpp
robot_state_publisher
differential_drive
)
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES motor_control
# CATKIN_DEPENDS ros_control roscpp rospy std_msgs
# DEPENDS system_lib
)
include_directories(
${catkin_INCLUDE_DIRS}
)
catkin_install_python(PROGRAMS
scripts/knex_arduino_connector.py
scripts/knex_scratch_connector.py
scripts/range_filter.py
scripts/range_to_laser.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
After I catkin_make under [ws], I did . [ws]/devel/setup.bash When I run rospack find, I can find knex_ros, but when I rosrun knex_ros whatever.py, I got
~/catkin_ws/src/knex_ros$ rosrun knex_ros knex_arduino_connector.py
[rosrun] Couldn't find executable named knex_arduino_connector.py below /home/andre/catkin_ws/src/knex_ros
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun] /home/andre/catkin_ws/src/knex_ros/scripts/knex_arduino_connector.py
I tried tab to show available executable from knex_ros package, it doesn't show anything. Other package under the same workspace work fine.
One weird thing I noticed happening along with not able to find executable is that I have to source devel/setup.bash every time I open a new terminal, and I didn't have to do this before.
update:
I ran catkin_make install and . install/setup.bash, and rosrun can find the executables. Not sure why only running catkin_make, rosrun works for other package containing python scripts, but not for knex_ros