MyCustomServiceMessage,srv does not exist when trying to catkin_make

Hello, I am currently up to Step 2 Part 5 of the Navigation project. I have created a new directory called ‘srv’ and created a new file ‘MyServiceMessage.srv’ inside of this directory.

In this ‘MyServiceMessage.srv’ file I have put the following as recommended:

string label

bool navigation_successfull
string message

From here I then made the recommended changes to the CMakeLists.txt file and the Package.xml file.

However, when I try to catkin_make I get the following error:

Can I make this new service inside of the ‘my_summit_localisation’ package created in Part 1 of Step 2? Or do I need an entirely new package for Part 5.

Hello @lachg258,

Well that error message indicates that the service file MyCustomServiceMessage.srv can’t be found. Are you sure the file is in the specified path (/home/user/catkin_ws/src/my_summit_localization/srv/)? Please make sure that the file is there both by accessing it through the Shell and also from the IDE.

Yes, you can place the service file inside the my_summit_localization package, there’s no need to create a new package for it.