Robotics StackExchange | Archived questions

"add_service_files()" is an unknown cmake command

I'm running ROS melodic on Ubuntu 18.04.6. I'm going through the Emil Vidmark tutorials if anyone is familiar. I'm trying to create a simple service:

int32 a
int32 b
---
int32 result

I have a service server node coded up and am adding my multiplier.srv to CMakeLists.txt:

add_service_files(FILES multiplier.srv)

I'm getting the error message:

CMake Error at tutorials/CMakeLists.txt:56 (add_service_files):
Unknown CMake command "add_service_files".

Let me know if you can help! Thanks in advance

Asked by jrsaffy on 2023-02-21 09:47:24 UTC

Comments

Could you provide a bit more context? How are you building your workspace?

Asked by joao.aguizo on 2023-02-22 06:06:17 UTC

Answers