Catkin_make fails in custom service

Hello,

I was not able to build the custom service code and was getting a message that message_generation should be included as a run dependency.

So, I added <exec_depend>message_generation<exec_depend> in package.xml and it works fine after that. However, in the given instruction on the website, it is not included in package.xml.

Please let me know if I am doing something wrong or whether it should be included in the package. Help will be much appreciated.

Regards,
Kashish Dhal

Hi @kashish.dhal,

Thanks for letting us know, but it was mentioned in the instructions to add it, under the heading Modification of package.xml in the topic Understanding ROS Services - Server.

Perhaps you missed that. Don’t worry, it sometimes happens.

Cheers!

Hello @bayodesegun,

I was following the tutorials and spotted this error. However, I just went over it again and saw what I wrote was correct. For reference, please see the picture attached.

Note: I am able to build it now but this information is for others who want to follow along the tutorials. It is totally upto you to review these changes.

Regards,
Kashish Dhal

Hi @kashish.dhal,

Thanks for the feedback! We’ll review it and update accordingly.

Hello @kashish.dhal,

I just tested Example 3.8 (for building the custom service message) step by step. It worked properly for me, without having to add message_generation as exec_depend. This makes sense, since message_generation is only needed when building the package.

Could you please try to reproduce again this Example? If you get the error you mentioned above, send me the package as it is to aezquerro@theconstructsim.com so that I can check it with more detail. Thanks in advance!

Best,

Hello @albertoezquerro,

I am wondering why you didn’t build. How the custom service will be generated without building?

Please let me know. Note that it failed when I did catkin make.

Regards,
Kashish Dhal

Hi @kashish.dhal,

Please go over the response from @albertoezquerro again, carefully. He didn’t mention anywhere that he didn’t build. In fact, he said that he tested the example step by step, indicating that he did all you were asked to do there and definitely he built the package.

The point he has made is that you don’t need message_generation as an exec_depend, because it is not needed during execution. It’s only needed during the build (when messages are generated); that’s why it’s only present as a build_depend.

In order to reinforce you learning, I would advise that you try building the package from scratch following the instructions carefully. If you run into any problem again, please contact @albertoezquerro as he mentioned.

Hello @bayodesegun,

I am sorry for the misunderstanding. I reproduced the error, please below:

I will email the files to @albertoezquerro.

Thanks,
Kashish Dhal