I do not understand the error message on this file. I believe I need to modify the CMake and XML files for the package -service_quiz_srv. This is the error message:


I do not understand the error message on this file. I believe I need to modify the CMake and XML files for the package -service_quiz_srv. This is the error message:


I think you are missing the
find_package(rosidl_default_generators REQUIRED)
Hi @ROxX ,
Along with what @martinetbon has indicated, you must also add another line in your CMakeLists.txt file.
This line goes under # find dependencies section:
find_package(rosidl_default_generators REQUIRED)
This line goes inside the rosidl_generate_interfaces(...) block:
rosidl_generate_interfaces(${PROJECT_NAME}
"srv/Spin.srv"
DEPENDENCIES std_msgs
)
You also need to add the following 3 lines in your package.xml, after the <depend> lines:
<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
Make sure you note down these steps for your future reference!
Regards,
Girish
Thank you the package passes the colcon build successfully now.
Hi @ROxX ,
Glad to know your issue is solved.
Please mark the relevant post as the “Solution” so this issue can be marked as closed.
Regards,
Girish
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.