From 1717315cebb72362ba915681735b595956c1c1b5 Mon Sep 17 00:00:00 2001 From: yamacir-kit Date: Fri, 13 Dec 2024 14:14:46 +0900 Subject: [PATCH] Update `TimeToCollisionCondition` to call `SpeedCondition` in standard compatible mode Signed-off-by: yamacir-kit --- .../syntax/time_to_collision_condition.hpp | 3 ++- .../scenario_test_runner/scenario/sample.yaml | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/openscenario/openscenario_interpreter/include/openscenario_interpreter/syntax/time_to_collision_condition.hpp b/openscenario/openscenario_interpreter/include/openscenario_interpreter/syntax/time_to_collision_condition.hpp index ff290830df5..3dc68ba3cd9 100644 --- a/openscenario/openscenario_interpreter/include/openscenario_interpreter/syntax/time_to_collision_condition.hpp +++ b/openscenario/openscenario_interpreter/include/openscenario_interpreter/syntax/time_to_collision_condition.hpp @@ -158,7 +158,8 @@ struct TimeToCollisionCondition : private Scope, private SimulatorCore::Conditio entities, triggering_entity, time_to_collision_condition_target.as(), directional_dimension()); } else { - return SpeedCondition::evaluate(entities, triggering_entity, directional_dimension()); + return SpeedCondition::evaluate( + entities, triggering_entity, directional_dimension(), Compatibility::standard); } }; diff --git a/test_runner/scenario_test_runner/scenario/sample.yaml b/test_runner/scenario_test_runner/scenario/sample.yaml index d465b19c270..37d6440f158 100644 --- a/test_runner/scenario_test_runner/scenario/sample.yaml +++ b/test_runner/scenario_test_runner/scenario/sample.yaml @@ -10,16 +10,7 @@ OpenSCENARIO: revMajor: 1 revMinor: 0 ParameterDeclarations: - ParameterDeclaration: - - name: random_offset - parameterType: double - value: $(ros2 run openscenario_interpreter_example uniform_distribution -1.0 1.0) - ConstraintGroup: - - ValueConstraint: - - rule: lessOrEqual - value: 1.0 - - rule: greaterOrEqual - value: -1.0 + ParameterDeclaration: [] CatalogLocations: VehicleCatalog: Directory: @@ -54,7 +45,7 @@ OpenSCENARIO: roadId: '' laneId: LANE_ID s: 1 - offset: $random_offset + offset: 0 Orientation: type: relative h: 0