ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Identify dependencies when group_depend is involved

asked 2018-05-11 10:22:34 -0600

amosteo gravatar image

updated 2018-05-14 04:04:38 -0600

I'm trying to navigate the tree of dependencies of some packages in ROS2 but I'm hitting a possible bug.

For normal build_depend and buildtool_depend I can use ament list_dependencies or inspect the package.xml

However, some packages use group_depend. After reading about the format 3 spec, I see this is kind of a reverse dependency specification. Now I would have to find all packages that state to belong to the group. That seems too impractical to be done by hand. And ament crashes when asking it for dependencies (ROS2 built from sources as of today):

$ ament list_dependencies rosidl_default_generators
Traceback (most recent call last):
  File "/home/jano/opt/ros2/install_isolated/ament_tools/bin/ament", line 11, in <module>
    load_entry_point('ament-tools==0.4.0', 'console_scripts', 'ament')()
  File "/home/jano/opt/ros2/install_isolated/ament_tools/lib/python3.6/site-packages/ament_tools/commands/ament.py", line 88, in main
    rc = args.main(args)
  File "/home/jano/opt/ros2/install_isolated/ament_tools/lib/python3.6/site-packages/ament_tools/verbs/list_dependencies.py", line 97, in main
    g.extract_group_members(packages.values())
  File "/home/jano/opt/ros2/install_isolated/ament_package/lib/python3.6/site-packages/ament_package/group_dependency.py", line 60, in extract_group_members
    assert g.evaluated_condition is not None
AssertionError

Any ideas on how to proceed besides grepping my way forward? Should I report this as a bug or am I doing something wrong? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-06-22 16:56:53 -0600

Dirk Thomas gravatar image

In the meantime we have switched from using ament_tools for ROS 2 to use colcon (see design article). For the upcoming ROS 2 release Bouncy we recommend using the new tool - even though ament_tools will still be available in that release.

Unfortunately that mean that we will not spend any effort on fixing issues in the deprecated tool. If you want to look into the problem and try to fix it we would certainly be happy to review / merge fixes. I think the problem is very similar to what was fixed in catkin_pkg recently. Maybe this diff helps.

Using the new build tool you can get a list of all build, run, and test dependencies: colcon info <pkgname> The result will consider group dependencies.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-05-11 10:21:40 -0600

Seen: 275 times

Last updated: Jun 22 '18