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

make Entity lane-changeable everywhere #1468

Merged
merged 10 commits into from
Dec 10, 2024
Merged

Conversation

HansRobo
Copy link
Member

@HansRobo HansRobo commented Dec 3, 2024

Description

Abstract

allow lane-changes everywhere in VEHICLE_WITH_ROAD_SHOULDER rouitng graph

Background

Basically, the lanelet2 lane change permission/disallowance setting is intended for Autoware and was not designed with the behavior of entities running in the traffic_simulator in mind.

Also, when an entity is commanded to change lanes in a scenario, it is considered appropriate to change lanes, even if that command ignores the Road Traffic Act and lane change settings.

Details

  • make the linestrings between road and road_shoulder into solid(un-lane-changeable) from dashed(lane-changeable)
  • allow lane-changes everywhere in VEHICLE_WITH_ROAD_SHOULDER rouitng graph

details of getLeftLaneletIds / getRightLaneletIds changes

In this pull-request, I changed lanelet2 function mapping switched by include_oppsite_direction flag.

previous mappping

  • include_oppsite_direction: true(The de facto default)
    • lanelet::routing::RoutingGraph::adjacentRights/adjacentLefts
  • include_oppsite_direction: false
    • lanelet::routing::RoutingGraph::rights/lefts

incoming mappping

  • include_oppsite_direction: true
    • no mapping (throw an exception)
  • include_oppsite_direction: false(The de facto default)
    • lanelet::routing::RoutingGraph::rights/lefts

Important

lanelet::routing::RoutingGraph::adjacentRights/adjacentLefts do not have the ability to acquire adjacent lanes,
including the opposite lane.
The only difference between rights and adjacentRights is whether the adjacent lanelet they acquire is routable or not.
(Both do not have the ability to acquire the opposite lanes.)

image

routing changes possibility due to this change

In this pull-request allows lane-changes everywhere.
This change will result in some changes to routing, as exemplified by the tests below.
Routing will always prioritize smaller cost (in this case, shorter distance), so longitudinal distance measurements may be smaller than before.

Before this pull-request
The routing graph and adjacent lane search options only allow you to get this route.
image

After this pull-request
By expanding the range of the RoutingGraph, we can compare more candidates and select a route with a shorter distance (in this case, the route is shorter if it goes on the inside of the curve).
image

References

Regression Test: OK

Destructive Changes

Please see "routing changes possibility due to this change" in Details section.

Known Limitations

Copy link

github-actions bot commented Dec 3, 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.

@HansRobo HansRobo added wait for regression test bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 labels Dec 9, 2024
@HansRobo HansRobo requested a review from hakuturu583 December 10, 2024 01:59
@HansRobo HansRobo marked this pull request as ready for review December 10, 2024 02:00
@hakuturu583 hakuturu583 added bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 and removed bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 labels Dec 10, 2024
…HdMapUtils::getLeftLaneletIds/getRightLaneletIds
@HansRobo HansRobo merged commit e9c8cb3 into master Dec 10, 2024
14 checks passed
@github-actions github-actions bot deleted the feature/lane-change-everywhere branch December 10, 2024 05:03
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.

2 participants