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

Change comparison oparator in isInLanelet #1389

Merged
merged 3 commits into from
Oct 2, 2024
Merged

Conversation

gmajrobotec
Copy link
Contributor

Description

In traffic_simulator::pose::isInLanelet comparison between distances and tolerance should be done with "<=" operator.

Abstract

In traffic_simulator::pose::isInLanelet to compare distance_to_start_lanelet_pose and distance_to_end_lanelet_pose with tolerance operator "<" is used. This can possibly lead to wrong result when tolerance is 0 and one of the measured distances is also 0, which means pose is in lanelet (start or end of it). If this is not expected behaviour operator "<=" should be used.

Details

I've changed operator "<" to "<=" in traffic_simulator::pose::isInLanelet function.

Destructive Changes

--

Known Limitations

--

Copy link

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.

@dmoszynski dmoszynski added the bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 label Sep 19, 2024
Copy link

sonarcloud bot commented Sep 20, 2024

@gmajrobotec gmajrobotec marked this pull request as ready for review September 25, 2024 05:38
@hakuturu583 hakuturu583 self-requested a review September 27, 2024 06:56
@tier4 tier4 deleted a comment from gmajrobotec Oct 2, 2024
@hakuturu583 hakuturu583 merged commit 78a44f7 into master Oct 2, 2024
10 checks passed
@github-actions github-actions bot deleted the 1377/isInLanelet branch October 2, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump patch If this pull request merged, bump patch version of the scenario_simulator_v2 wait for regression test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants