Here is my CMakeLists.txt and package.xml
cmake_minimum_required(VERSION 3.5)
project(detectron_interface)
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
set(srv_files
"srv/Detectron.srv"
)
rosidl_generate_interfaces(${PROJECT_NAME}
${srv_files}
DEPENDENCIES sensor_msgs
)
ament_export_dependencies(rosidl_default_runtime)
ament_package()
`
<package format="3">
<name>detectron_interface</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer <a="" href="mailto:email="macziek@aol.com">ros</maintainer">email="macziek@aol.com">ros>
<license>TODO: License declaration</license></maintainer></package>
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>`
The problem still persists! Can you guide me on that
I had a similar error and my guess is that your CMakeLists.txt file or package.xml file is incorrect, but it's hard to tell without more information.