0
$\begingroup$

Rosanswers logo

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.


Originally posted by amosteo on ROS Answers with karma: 43 on 2018-05-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Dirk Thomas with karma: 16276 on 2018-06-22

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.