Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/multi level lanelet support #1481

Merged
merged 20 commits into from
Dec 16, 2024

Conversation

SzymonParapura
Copy link
Contributor

@SzymonParapura SzymonParapura commented Dec 9, 2024

Description

Abstract

This pull request introduces support for multi-level lanelets (e.g., bridges over roads) by improving lanelet matching and collision solving mechanisms. Previously, lanelet matching relied on 2D position checks, which could lead to incorrect detections and false-positive collisions when entities were on different altitudes.

Background

In multi-level environments – such as maps featuring bridges over roads or tunnels beneath roads – the previous lanelet matching and collision detection algorithms relied solely on 2D proximity checks. This approach considered only the X and Y coordinates of entities, ignoring their altitude (Z-axis).

As a result, entities located on different levels (e.g., a vehicle on a bridge and another vehicle on the road below) could be incorrectly matched to the same lanelet. This caused:

  • False-positive detections: Entities were mistakenly identified as obstacles, even though they were on different levels.
  • Unnecessary slowing or stopping: The Ego vehicle would slow down or stop due to these incorrect detections, reducing driving efficiency and simulation realism.

To resolve these issues, 3D lanelet matching and collision-solving mechanisms have been introduced.

Details

Enhancements to Lanelet Matching

3D Matching Support

  • The toLaneletPose method has been updated to incorporate the altitude (Z-axis) of entities when performing lanelet matching. This helps ensure that entities are correctly matched to lanelets on the appropriate level.

New altitude_threshold Parameter

  • Added a parameter altitude_threshold to define the maximum altitude difference allowed when matching an entity to a lanelet.

Improvements to Collision Solving

BehaviorTree Updates

  • The BehaviorTree logic now considers the altitude of potential obstacles. This allows NPCs to ignore entities that are on a different vertical level. Link to introduced changes.

Ego Plane Determination

  • A mechanism for determining the Ego plane was introduced. Entities that fall below this plane (e.g., vehicles under a bridge) are excluded from detection. Link to introduced changes.

Geometry Enhancements

Fix traffic_source class

  • The TrafficSource::makeRandomPose method does not account for the Z-axis when generating random positions. As a result, the generated position may be incorrect and an entity may not match to the lanelet. To fix this issue, the Z-coordinate is now assigned based on the altitude of the first nearby lanelet found. Link to introduced changes

Fix Unit tests

References

Internal link 1
Internal link 2

Destructive Changes

--

Known Limitations

--

 - Enhanced lanelet matching algorithm (`toLaneletPose` method) by incorporating lanelet altitude.
 - Defined the `altitude_threshold` parameter that sets the maximum altitude difference to determine when an entity can be matched with a specific lanelet.
 - Enhanced BehaviorTree to consider altitude when detecting potential obstacles,
   allowing to ignore objects located at different altitudes.
 - Modified the detection sensor by introducing Ego plane determination to exclude objects below the Ego plane,
   preventing unnecessary slowing or stopping caused by incorrect detections.
@SzymonParapura SzymonParapura added the bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 label Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 2024

Checklist for reviewers ☑️

All references to "You" in the following text refer to the code reviewer.

  • Is this pull request written in a way that is easy to read from a third-party perspective?
  • Is there sufficient information (background, purpose, specification, algorithm description, list of disruptive changes, and migration guide) in the description of this pull request?
  • If this pull request contains a destructive change, does this pull request contain the migration guide?
  • Labels of this pull request are valid?
  • All unit tests/integration tests are included in this pull request? If you think adding test cases is unnecessary, please describe why and cross out this line.
  • The documentation for this pull request is enough? If you think adding documents for this pull request is unnecessary, please describe why and cross out this line.

@SzymonParapura SzymonParapura marked this pull request as draft December 9, 2024 10:15
@SzymonParapura
Copy link
Contributor Author

There is no regresssion

@SzymonParapura SzymonParapura marked this pull request as ready for review December 11, 2024 13:22
@HansRobo HansRobo merged commit 45a3a51 into master Dec 16, 2024
14 checks passed
@github-actions github-actions bot deleted the feature/multi-level-lanelet-support branch December 16, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump minor If this pull request merged, bump minor version of the scenario_simulator_v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants