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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
Copy link
Contributor Author

No Scenario Compare
1 ⭕⇒❌ : cmn_UC-E-03_発進_障害物停止 / UC-v3-E-03-00004_002_case01_cmn_general
base : URL
eval : URL
Params : {'__tier4_modifier_bicycle_position': '30', '__tier4_modifier_bicycle_speed': '4.1667', '__tier4_modifier_ego_position': '0.2'}
Message : Simulation failure: CustomCommandAction typed "exitFailure" was triggered by the anonymous Condition (OpenSCENARIO.Storyboard.Story[0].Act["_EndCondition"].ManeuverGroup[0].Maneuver[0].Event[1].StartTrigger.ConditionGroup[0].Condition[0]): Is the simulation time (= 60.033333333329927938848413759843) is greaterThan 60.000000000000000000000000000000?
Screenshot from 2024-09-24 17-33-11
2 ⭕⇒❌ : cmn_UC-E-04_発進_障害物回避 / UC-v3-E-04-00101_001_case01_cmn_general
base : URL
eval : URL
Params : {'__tier4_modifier_egolateral': '-1.3', '__tier4_modifier_egolongitudinal': '-0.5', '__tier4_modifier_npc_position': '4', '__tier4_modifier_start_position': '8'}
Message : Simulation failure: CustomCommandAction typed "exitFailure" was triggered by the anonymous Condition (OpenSCENARIO.Storyboard.Story[0].Act["_EndCondition"].ManeuverGroup[0].Maneuver[0].Event[1].StartTrigger.ConditionGroup[1].Condition[0]): Is any of [ego]'s standstill time = [[10.0333]] greaterThan 10.000000000000000000000000000000?
Screenshot from 2024-09-25 07-12-58
3 ⭕⇒❌ : cmn_UC-E-04_発進_障害物回避 / UC-v3-E-04-00001_001_case05_cmn_general
base : URL
eval : URL
Params : {'__tier4_modifier_npc_position': '6', '__tier4_modifier_npclateral': '1'}
Message : Simulation failure: CustomCommandAction typed "exitFailure" was triggered by the anonymous Condition (OpenSCENARIO.Storyboard.Story[0].Act["_EndCondition"].ManeuverGroup[0].Maneuver[0].Event[1].StartTrigger.ConditionGroup[2].Condition[0]): The state of StoryboardElement "act_ego_nostop" (= completeState) is given state completeState?
Screenshot from 2024-09-25 07-17-38
4 ⭕⇒❌ : cmn_UC-J-11_駐車場_停車 / UC-v2-J-11-00001_003_case03_cmn_general
base : URL
eval : URL
Params : {}
Message : Simulation failure: CustomCommandAction typed "exitFailure" was triggered by the anonymous Condition (OpenSCENARIO.Storyboard.Story[0].Act["_EndCondition"].ManeuverGroup[0].Maneuver[0].Event[1].StartTrigger.ConditionGroup[0].Condition[0]): Is the simulation time (= 180.033333333323128044867189601064) is greaterThan 180.000000000000000000000000000000?
Screenshot from 2024-09-25 07-22-14
5 ⭕⇒❌ : cmn_UC-J-11_駐車場_停車 / UC-v2-J-11-00001_001_case08_cmn_general
base : URL
eval : URL
Params : {}
Message : Simulation failure: CustomCommandAction typed "exitFailure" was triggered by the anonymous Condition (OpenSCENARIO.Storyboard.Story[0].Act["_EndCondition"].ManeuverGroup[0].Maneuver[0].Event[1].StartTrigger.ConditionGroup[0].Condition[0]): Is the simulation time (= 180.033333333323128044867189601064) is greaterThan 180.000000000000000000000000000000?
Screenshot from 2024-09-25 07-29-19

@gmajrobotec gmajrobotec marked this pull request as ready for review September 25, 2024 05:38
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.

2 participants