Not able to import srv file

I am getting this error and don’t know what I am doing wrong. I have saved both .srv and .py files in the same pkg. I have also edited both .xml and .txt files. can someone point out what I might be doing wrong?
Thanks.

Hi @Aniket2 ,

Please, share with me your rosject share link or at least the code you have created.

There must be an error the way this service was defined or the way it is being imported.

Consider also that even if you are programming with Python, you need to build the workspace in order to generate the service files.

Regards

I did not add std_msgs in find_package() in CMakeList.txt file. That was the issue here. This is the second time it is happening to me. I always seem to miss this. @marco.nc.arruda Thanks for the reply.

1 Like

Hi @Aniket2 ,

Glad that you find out the error.

Thank you for sharing the solution,

Regards

1 Like