I am trying to run rosrun script forward.py but it gives me an error saying [rospack] Error: package 'script' not found

In my bashrc I've added these lines:

source /opt/ros/indigo/setup.bash
source /home/hassan/catkin_ws/devel/setup.bash
export ROS_PACKAGE_PATH=/home/home/catkin_ws:/opt/ros/indigo/share:/opt/ros/indigo/stacks
export ROS_WORKSPACE=/home/hassan/catkin_ws

What could be the reason? I am following this video: https://www.youtube.com/watch?v=zwTnY-ZqNcM&t=102s


1 Answer 1


There may be several reasons:

  • You haven't compiled all your projects in the workspace, to fix it go to your workspace cd ~/catkin_ws then execute catkin_make. If it works and you don't have compilation errors, source your workspace source ~/catkin_ws/devel/setup.bash, then re-try.
  • When you are typing rosrun script forward.py, you expect to launch the script forward.py from the package script. Check if your folder ~/catkin_ws/src/script exists, if not this cannot work!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.