Issue while creating a new package

Hello,

I am in the 6th chapter of the course and I have been running into this error quite often now. When I create a new package and try to edit the CMakeList to customize my package for example in services the catkin_make doesn’t compile properly in the newly created package.

Strangely I had created My_package package a few days back and when I compile my CMakeList there with customized service message it complies properly. I am confused because I follow the same steps in both the packages one complies and another doesn’t.

its the same with the package.xml. Both CMakeList and Package.xml has issues when I create a new package and they dont compile.

This happened with me while creating customized messages for topic as well. It always shows the package as my_package instead of the new package name that i would have created in the messages on the webshell.

I would like to know if I am doing some mistake while creating a new package or is it something else

Hi, there are a number of things that could be going on. Please share a screenshot of the commands you are using, as well as your package.xml and CMakelists.txt. A good thing to try when these issues arise are checking if you are creating the package in the correct location (inside src folder), and removing your build/ and devel/ folders and compiling again with the following commands:

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