I created a package in catkin workspace and put a publisher.py node inside the src directory of package which worked fine. Then i added another node subscriber.py node and used catkin_make to build. Now when I try to run any of the nodes or find package i am getting above error. Am I missing any step ?


  • $\begingroup$ Thank you so much . Writing source devel/setup.bash worked $\endgroup$
    – Abhishek
    Commented Apr 29, 2021 at 18:13

1 Answer 1


It's hard to tell what's going wrong from just from you describing the error (might be better to paste the message directly..Sounds like a problem with your ROS_PACKAGE_PATH environment variable. I'm assuming you're following this tutorial)? I remember having had this problem before, so some possible things to try:

  • You may need to just type in source devel/setup.bash into your terminal.
  • Make sure your bash.rc file is properly set. Refer to this question. (If I remember correctly, if you don't want to type in source devel/setup.bash every time you open up a new terminal you can edit the bash.rc file.)

  • Check that your CMAKE_PREFIX_PATH is right.

Also, try entering rospack find [package_name] into the terminal to find the path to the package.


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.