drake-ros icon indicating copy to clipboard operation
drake-ros copied to clipboard

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

Open EricCousineau-TRI opened this issue 1 year ago • 8 comments

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: https://github.com/RobotLocomotion/drake-ros/blob/543402f8ef5bf73e433e1ff56ff361fb73c14103/drake_ros_examples/BUILD.bazel#L23-L31

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

EricCousineau-TRI avatar Mar 31 '23 19:03 EricCousineau-TRI