I've been trying to establish communication between 2 nodes and shared library .so. Encountered an error:
Packages installing interfaces must include '<member_of_group>rosidl_interface_packages</member_of_group>' in their package.xml Call Stack (most recent call first): CMakeLists.txt:24 (rosidl_generate_interfaces)
my CMakeLists.txt:
cmake_minimum_required(VERSION 3.5)
project(parameter_subscriber)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
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 dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rosidl_default_generators REQUIRED)
# Generate messages
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Parameters.msg"
)
# Add executable
add_executable(subscriber src/subscriber.cpp)
ament_target_dependencies(subscriber rclcpp)
rosidl_target_interfaces(subscriber ${PROJECT_NAME} "rosidl_typesupport_cpp")
# Specify the path to the shared library
set(LIBBEBOT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../libbebot.so")
# Link the shared library
target_link_libraries(subscriber ${LIBBEBOT_PATH})
install(TARGETS
subscriber
DESTINATION lib/${PROJECT_NAME})
ament_export_dependencies(rosidl_default_runtime)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()
my package.xml:
<?xml version="1.0"?>
<package format="3">
<name>parameter_subscriber</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<license>TODO: License declaration</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<build_depend>rclcpp</build_depend>
<exec_depend>rclcpp</exec_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
<member_of_group>rosidl_interface_packages</member_of_group>
</export>
</package>
What can be an issue here? Thank you for your time!