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.