Error catkin_make custom srv message

Category: Unit 6 Services in ROS: Servers & Messages

I’ve been following Exercise 6.5, the code (CMakeLists.txt, package.xml, cpp, package name, srv) are the same as the example.

I’ve been trying to solve the issue.
catkin_make the Service Message package gives me this error


I’ve also create the package again and delete the one in catkin_ws/build.

Hi @RC1 ,

I think you need to create my_custom_srv_msg_pkg from scratch again.

I see the line in your terminal message (4th line in your picture):

-- my_custom_srv_msg_pkg: 0 messages, 8 services

Seriously??? You have eight service messages inside that package?
There should technically be only one (or two if you want to experiment) - not eight! What did you do?

The message should look as shown below.

MyCustomServiceMessage.srv

int32 duration    # The time (in seconds) during which BB-8 will keep moving in circles
---
bool success         # Did it achieve it?

This should be the folder structure (this is what I have):

./my_custom_srv_msg_pkg/
├── CMakeLists.txt
├── include
│   └── my_custom_srv_msg_pkg
├── launch
│   └── my_custom_service_server.launch
├── package.xml
├── src
│   └── custom_service_server.cpp
└── srv
    └── MyCustomServiceMessage.srv

5 directories, 5 files

Let me know if you got this fixed!

Regards,
Girish