I am not sure if this is it, but in the ROS2 tutorials the package example_interfaces
is used - there in CMakeLists.txt
you have these lines:
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"action/Fibonacci.action"
...
"srv/Trigger.srv"
)
install(FILES mapping_rules.yaml DESTINATION share/${PROJECT_NAME})
ament_export_dependencies(rosidl_default_runtime)
ament_package()
and in package.xml
:
<package format="3">
<name>example_interfaces</name>
<version>0.9.3</version>
<description>Contains message and service definitions used by the examples.</description>
<maintainer email="mabel@openrobotics.org">Mabel Zhang</maintainer>
<license>Apache License 2.0</license>
<author email="dthomas@openrobotics.org">Dirk Thomas</author>
<author email="jacob@openrobotics.org">Jacob Perron</author>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>
<depend>action_msgs</depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
A note about package_name_interfaces
from https://docs.ros.org/en/foxy/Tutorial... :
While best practice is to declare
interfaces in dedicated interface
packages, sometimes it can be
convenient to declare, create and use
an interface all in one package.
The dependencies in the basic service examples are fulfilled with ament_target_dependencies(service_main rclcpp example_interfaces)
in their CMakeLists.txt
(e.g. https://github.com/ros2/examples/blob...).
Can you link us these articles? Especially the first one about migrating