Package.xml in custom interface creation

I am confused on package.xml modification for custom interface creation.

For custom message and service interface, I was told to add

<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>

while for custom action interface, I was told to add

< depend>rosidl_default_generators< /depend>
<member_of_group>rosidl_interface_packages</member_of_group>

It seems I can not put both there. I got a redundant error.

Please help.

Thanks.

Lu

Just add those lines to your package.xml:

<build_depend>rosidl_default_generators</build_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
1 Like

Hi @ljiang ,

<depend>...</> is same as defining <build_depend>...</> AND <exec_depend>...</>.

So, if you define all the three tags, you will get redundancy error.

So, if any package is both the build and execution dependency, put it as <depend>.

Regards,
Girish

rosidl_default_runtime has different name from rosidl_default_generators. That make me think < depend>…</> maybe slightly different from <build_depend>…</> and <exec_depend>…</>.

Hi @ljiang ,

This is what I meant:

  1. <depend>...</> AND <build_depend>...</> will cause redundancy.
  2. <depend>...</> AND <exec_depend>...</> will cause redundancy.

So If you have:
<build_depend>rosidl_default_generators</build_depend>
AND
<depend>rosidl_default_generators</depend>
It is better to use only <depend>...</>.

So, at the end you will have:

<depend>rosidl_default_generators</depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>

I did not tell you to remove rosidl_default_runtime.

I hope this clarifies your doubt.

Regards,
Girish

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.