Skip to content

refactor(autoware_ground_segmentation/launch, autoware_probabilistic_occupancy_grid_map/launch): use launch substitution instead of get_package_share_directory#12392

Merged
paulsohn merged 6 commits intoautowarefoundation:mainfrom
paulsohn:sohn/remove-ament-index-python-on-launchers-perc
Apr 3, 2026
Merged

refactor(autoware_ground_segmentation/launch, autoware_probabilistic_occupancy_grid_map/launch): use launch substitution instead of get_package_share_directory#12392
paulsohn merged 6 commits intoautowarefoundation:mainfrom
paulsohn:sohn/remove-ament-index-python-on-launchers-perc

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.

Also, obsolote default of updater_param_file in perception/autoware_probabilistic_occupancy_grid_map/launch/laserscan_based_occupancy_grid_map.launch.py is updated to "binary_bayes_filter_updater.param.yaml".

This PR aims to follow proper semantics of launcher system which is open to the launcher-specific tooling / analysis, without handling the full python semantics itself.

Will make a separate PR for sensing-related refactor.

Related links

autowarefoundation/autoware_launch#1762
autowarefoundation/autoware_launch#1799

How was this PR tested?

Built and ran all four: no launcher-side error was found.

$ ros2 launch autoware_ground_segmentation scan_ground_filter.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map laserscan_based_occupancy_grid_map.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map multi_lidar_pointcloud_based_occupancy_grid_map.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map pointcloud_based_occupancy_grid_map.launch.py

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.
The only difference is that default value of updater_param_file is no longer "updater.param.yaml" (which is incorrect, as the file does not exist) but existing "binary_bayes_filter_updater.param.yaml".

@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Mar 30, 2026
@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:

Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>
Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>
@paulsohn paulsohn force-pushed the sohn/remove-ament-index-python-on-launchers-perc branch from b15253d to ffeb6ba Compare March 30, 2026 08:20
@paulsohn paulsohn added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 30, 2026
@paulsohn paulsohn marked this pull request as ready for review March 30, 2026 08:20
@paulsohn paulsohn changed the title refactor: use launch substitution instead of get_package_share_directory refactor(autoware_ground_segmentation/launch, autoware_probabilistic_occupancy_grid_map/launch): use launch substitution instead of get_package_share_directory 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 19.12%. Comparing base (51bc478) to head (28ee3df).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12392      +/-   ##
==========================================
- Coverage   19.18%   19.12%   -0.07%     
==========================================
  Files        1892     1890       -2     
  Lines      130117   129796     -321     
  Branches    46611    48073    +1462     
==========================================
- Hits        24965    24823     -142     
- Misses      85580    86099     +519     
+ Partials    19572    18874     -698     
Flag Coverage Δ *Carryforward flag
daily 20.99% <ø> (-0.01%) ⬇️ Carriedforward from 42a6a1d
daily-cuda 18.56% <ø> (-0.01%) ⬇️ Carriedforward from 42a6a1d
daily-humble-amd64-cuda 18.56% <ø> (+0.02%) ⬆️ Carriedforward from 42a6a1d
daily-humble-amd64-nocuda 21.00% <ø> (-0.07%) ⬇️ Carriedforward from 42a6a1d
daily-humble-arm64-cuda ?
daily-jazzy-amd64-nocuda ?
differential 3.47% <ø> (?)
differential-cuda 9.36% <ø> (?)
total-cuda 18.56% <ø> (-0.01%) ⬇️ Carriedforward from 42a6a1d
total-humble-cuda 18.56% <ø> (+<0.01%) ⬆️ Carriedforward from 42a6a1d

*This pull request uses carry forward flags. Click here to find out more.

☔ 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

@badai-nguyen badai-nguyen left a comment

Choose a reason for hiding this comment

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

confirmed no error when run

$ ros2 launch autoware_ground_segmentation scan_ground_filter.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map laserscan_based_occupancy_grid_map.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map multi_lidar_pointcloud_based_occupancy_grid_map.launch.py
$ ros2 launch autoware_probabilistic_occupancy_grid_map pointcloud_based_occupancy_grid_map.launch.py

LGTM (regarding autowaer_ground_segmentation)

@paulsohn paulsohn enabled auto-merge (squash) March 31, 2026 03:27
@badai-nguyen
Copy link
Copy Markdown
Contributor

@paulsohn PR still is blocked because missing approval from codeowner of autoware_probabilistic_occupancy_grid_map
@YoshiRi could you review this PR?

@paulsohn paulsohn merged commit e393f23 into autowarefoundation:main Apr 3, 2026
62 checks passed
@github-project-automation github-project-automation bot moved this from To Triage to Done in Software Working Group Apr 3, 2026
xmfcx pushed a commit that referenced this pull request Apr 4, 2026
…occupancy_grid_map/launch): use launch substitution instead of get_package_share_directory (#12392)

* refactor: use launch substitution instead of get_package_share_directory

Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>

* use existing file for default

Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>

---------

Signed-off-by: Taeseung Sohn <taeseung.sohn@tier4.jp>
@paulsohn paulsohn deleted the sohn/remove-ament-index-python-on-launchers-perc branch April 7, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:perception Advanced sensor data processing and environment understanding. (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.

3 participants