Skip to content

[ament_index] Should fix / simplify injection of per-package AMENT_PREFIX_PATH #270

Open
@EricCousineau-TRI

Description

@EricCousineau-TRI

I don't understand why we inject per-package AMENT_PREFIX_PATH.
Can we simplify and report as few paths as possible, if ament_index recurses? (We know Drake's PackageMap does)

For example, in #269, I only depend on the data for rviz_default_plugins:

ros_py_test(
name = "parse_ros_model_test",
srcs = ["test/parse_ros_model_test.py"],
main = "test/parse_ros_model_test.py",
# TODO(eric.cousineau): Use a non-test resource and enable this test.
tags = ["manual"],
data = ["@ros2//:rviz_default_plugins_share"],
deps = ["@drake//bindings/pydrake"],
)

However, if I print out os.environ["AMENT_PREFIX_PATH"], I see all of the packages listed.
For PackageMap, I see the following slew of errors:

$ bazel run //:parse_ros_model_test
<313 lines of similar errors>
WARNING  drake:None:0 Unable to open directory: {runfiles}/ros2/archive/ament_clang_tidy
WARNING  drake:None:0 Unable to open directory: {runfiles}/ros2/archive/ament_clang_format

Assigning @sloretz for disposition, \cc @adityapande-1995

FYI @adeeb10abbas @jwnimmer-tri

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions