Skip to content

refactor(autoware_pointcloud_preprocessor/launch): use launch substitution instead of get_package_share_directory#12395

Merged
paulsohn merged 2 commits intoautowarefoundation:mainfrom
paulsohn:sohn/remove-ament-index-python-on-launchers-sensing
Apr 9, 2026
Merged

refactor(autoware_pointcloud_preprocessor/launch): use launch substitution instead of get_package_share_directory#12395
paulsohn merged 2 commits intoautowarefoundation:mainfrom
paulsohn:sohn/remove-ament-index-python-on-launchers-sensing

Conversation

@paulsohn
Copy link
Copy Markdown
Contributor

@paulsohn paulsohn commented Mar 30, 2026

Description

Use high-level API: FindPackageShare from launch.substitutions and PathJointSubstitution from launch_ros.substitutions in launch.py files, instead of raw ament_index_python and os.path.join.

This PR aims to follow proper (opaque) semantics of launcher system, separating from the python semantics itself.

Related links

autowarefoundation/autoware_launch#1762
autowarefoundation/autoware_launch#1799

How was this PR tested?

Ran all three with defaults:

$ ros2 launch autoware_pointcloud_preprocessor pointcloud_densifier.launch.py
$ ros2 launch autoware_pointcloud_preprocessor polygon_remover.launch.py
$ ros2 launch autoware_pointcloud_preprocessor preprocessor.launch.py # errors

Only the last one errors but this is likely irrelevant to this PR. It fails on main as well. I won't do the fix in this PR.

[ERROR] [launch]: Caught exception in launch (see debug for traceback): expected 'else' after 'if' expression (<string>, line 1)

The other two launcher do not have any launcher-side errors.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None. When launched with standard ros2 launch, this should give identical result before and after the PR.

Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@paulsohn paulsohn changed the title refactor: use launch substitution instead of get_package_share_directory refactor(autoware_pointcloud_preprocessor/launch): use launch substitution instead of get_package_share_directory Mar 30, 2026
@paulsohn paulsohn added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 30, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 14.12%. Comparing base (a2f5077) to head (022e012).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main   #12395       +/-   ##
===========================================
- Coverage   18.73%   14.12%    -4.62%     
===========================================
  Files        1904      182     -1722     
  Lines      129993    11718   -118275     
  Branches    43951     4484    -39467     
===========================================
- Hits        24355     1655    -22700     
+ Misses      85645     8809    -76836     
+ Partials    19993     1254    -18739     
Flag Coverage Δ
full-suite 14.12% <ø> (-4.62%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paulsohn paulsohn enabled auto-merge (squash) April 9, 2026 06:57
@paulsohn paulsohn merged commit 5a0ebe0 into autowarefoundation:main Apr 9, 2026
40 checks passed
@github-project-automation github-project-automation bot moved this from To Triage to Done in Software Working Group Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants