I can let the new message run; however, after adding this part into CMakefile.txt, I can not execute the package at all. Is this a normal situation?
Have you compiled again and sourced again?
Also, are you compiling in the /home/user/catkin_ws
directory?
According to the example, you are correct.
So far, we still don’t know what is not working in your package. Please provide details so we can help you point out what could be wrong.