Getting error in c++ basics for ros

topic 4 has me create a package, that fine and diddy but every time I try to launch pkg with launch file I get this error:

Package ‘topic_publisher_pkg’ not found: “package ‘topic_publisher_pkg’ not found, searching: [’/opt/ros/foxy’]”

This is weird because I sourced the source ~/catkin_ws/devel/setup.bash and everything, yet still it doesn’t see the package.

Does anyone know how to deal with this sort of problem?

Hi @bartoszekmmmm
1.Did you compile using catkin_make while being in the catkin_ws directory and later source it?
2. If you have done the above, run rospack profile to update the list of packages

Let me knowif this changes anything