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

Support RelativeClearanceCondition in OpenSCENARIO XML 1.3 #1316

Merged
merged 54 commits into from
Aug 21, 2024

Conversation

HansRobo
Copy link
Member

@HansRobo HansRobo commented Jul 8, 2024

Description

Abstract

This pull-request supports RelativeClearanceCondition in OpenSCENARIO XML 1.3.
Please refer to the reference for detailed specifications.

image

Background

In the conventional implementation of RelativeDistanceCondition/DistanceCondition in scenario_simulator_v2, we were able to distinguish between front and back or left and right by handling negative distance values.
However, these did not conform to the OpenSCENARIO standard.
In order to maintain the expressiveness and maintainability of scenarios while complying with the standard, we decided to implement this RelativeClearanceCondition, which allows you to specify ranges forward, backward, left, and right.

Details

To implement RelativeClearanceCondition, some functions in traffic_simulator are implemented.

countLaneChanges function

Previously, you can get lateral distance in lane coodinate.
But its unit is meter and RelativeClearanceCondition requires lateral distance in unit "lane".
To address this, a function was implemented which routes between two given points and counts lane changes.
The routing method used in this function is exactly the same as that used in other functions, and internally it corresponds to the implementation for RoutingAlgorithm::undefined / RoutingAlgorithm::shortest.
RelativeClearanceConditon implemented using the function implementation for RoutingAlgorithm::shortest.

References

Destructive Changes

None

Known Limitations

The oppositeLanes option is not supported in this pull-request.
This is related to the fact that the current implementation of traffic_simulator does not generally support routing that includes opposite lanes.

Copy link

github-actions bot commented Jul 8, 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 and others added 25 commits July 8, 2024 17:52
…to-collision-condition branch

Co-authored-by: yamacir-kit <[email protected]>
…aml to check RelativeClearanceCondition in more detail
@HansRobo HansRobo added the bump minor If this pull request merged, bump minor version of the scenario_simulator_v2 label Jul 31, 2024
@HansRobo HansRobo requested a review from yamacir-kit August 1, 2024 09:11
@HansRobo HansRobo marked this pull request as ready for review August 1, 2024 09:11
@HansRobo HansRobo merged commit 01da5d1 into master Aug 21, 2024
13 checks passed
@HansRobo HansRobo deleted the relative-clearance-condition branch August 21, 2024 07:05
@github-actions github-actions bot restored the relative-clearance-condition branch August 21, 2024 07:05
@github-actions github-actions bot deleted the relative-clearance-condition branch August 21, 2024 07:06
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