Skip to content

feat(feature_environment_recognizer)!: add feature environment recognizer based on polygon area of LL2#11768

Draft
Motsu-san wants to merge 5 commits intoautowarefoundation:mainfrom
Motsu-san:feat/feature_environment_recognizer
Draft

feat(feature_environment_recognizer)!: add feature environment recognizer based on polygon area of LL2#11768
Motsu-san wants to merge 5 commits intoautowarefoundation:mainfrom
Motsu-san:feat/feature_environment_recognizer

Conversation

@Motsu-san
Copy link
Copy Markdown
Contributor

@Motsu-san Motsu-san commented Dec 11, 2025

This package determines which area (polygon) in a Lanelet2 map the current position belongs to and identifies the environment ID based on the area's subtype. It can be used to identify environments with rich/poor features for map matching.

By using area-based determination instead of lanelet IDs, information can be directly embedded in the map, avoiding issues where lanelet IDs change when the map is regenerated.

Features:

  • Reads areas from the polygon layer of Lanelet2 maps
  • Determines which area the current position is within (point-in-polygon check)
  • Determines environment ID based on the area's subtype
  • Publishes environment ID (integer)

The package helps identify environments where map matching may be challenging due to lack of features (e.g., tunnel straight sections, uniform roads).

Description

Related links

autowarefoundation/autoware_launch#1717

Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

…et ID matching

Add a new package `autoware_feature_environment_recognizer` that recognizes
feature-rich/poor environments for map matching by identifying which lanelet
the current position belongs to and matching it against configured lanelet ID lists.

Features:
- Extract current lanelet from pose using autoware_lanelet2_utils
- Classify environment based on lanelet ID matching with configurable lists
- Publish environment recognition result with custom message including:
  * Input pose timestamp
  * Environment ID (-1: invalid, 0: normal, 1: uniform road, 2: feature-poor)
  * Confidence (reserved for future use)

The package helps identify environments where map matching may be challenging
due to lack of features (e.g., tunnel straight sections, uniform roads).

Signed-off-by: Motsu-san <83898149+Motsu-san@users.noreply.github.com>
@github-actions github-actions bot added type:documentation Creating or refining documentation. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Dec 11, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 11, 2025

Thank you for contributing to the Autoware project!

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

Please ensure:

@Motsu-san Motsu-san changed the title feat(feature_environment_recognizer)!: add feature environment recognizer based on lanelet ID matching feat(feature_environment_recognizer)!: add feature environment recognizer based on polygon area of LL2 Dec 12, 2025
- Replace lanelet ID-based matching with area (polygon) based determination
- Use boost::geometry for point-in-polygon checks similar to PoseEstimatorArea
- Change parameter format from environment_id_<number>.lanelet_ids to area_subtype_<name>.environment_id
- Move header file from include/ to src/ directory
- Update README to English and document area-based approach
- Remove lanelet search logic (search_distance_threshold, search_yaw_threshold)

This change allows embedding environment information directly in the map,
avoiding maintenance issues when lanelet IDs change during map regeneration.
Areas are defined in the Lanelet2 map with type="feature_environment_specify"
and subtype matching the parameter configuration.

Signed-off-by: Motsu-san <83898149+Motsu-san@users.noreply.github.com>
pre-commit-ci-lite bot and others added 2 commits December 12, 2025 01:14
Signed-off-by: Motsu-san <83898149+Motsu-san@users.noreply.github.com>
@paulsohn
Copy link
Copy Markdown
Contributor

paulsohn commented Feb 6, 2026

@Motsu-san cc @TaikiYamada4 @YamatoAndo

As we decided to migrate tier4 launchers into autoware_launch repository,
a separate PR for tier4 launchers must be created unless this PR is merged before 2026/02/10 07:00 UTC (16:00 JST)

@stale
Copy link
Copy Markdown

stale bot commented Apr 11, 2026

This pull request has been automatically marked as stale because it has not had recent activity.

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:launch Launch files, scripts and initialization tools. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) status:stale Inactive or outdated issues. (auto-assigned) type:documentation Creating or refining documentation. (auto-assigned)

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

2 participants