TIP: What to do when ROS package is not found

One of the most common issues that appear on this forum is when ROS can’t find a certain package. The error message shows:

package ‘$PACKAGE_NAME’ not found

One of the first things to know is that this can happen when the workspace doesn’t compile correctly. This can be often quickly solved by deleting the build/ and devel/ folders and compiling again:

cd ~/catkin_ws/
rm -rf build/ devel/
catkin_make

Also, don’t forget to run

rospack profile

If this doesn’t fix the problem, then I recommend going through the necessary additions in CMakeLists.txt and package.xml when a new package is created. You can find these instructions in the first unit of our course ROS Basics in 5 Days.

1 Like