Skip to content

Commit

Permalink
Bugfixes while testing with esmini 2.12.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Rauschert <andreas.rb.rauschert@bmw.de>
  • Loading branch information
arauschert committed Jul 13, 2021
1 parent 24f6d7a commit d6d91ea
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 18 deletions.
22 changes: 11 additions & 11 deletions Catalogs/Vehicles/VehicleCatalog.xosc
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@
<Property name="SteeringRatio" value="15.0" />
</Properties>
<BoundingBox>
<Center x="1.3" y="0.0" z="0.8" />
<Dimensions width="1.8" length="4.5" height="1.5" />
<Center x="7.0" y="0.0" z="1.75" />
<Dimensions width="2.5" length="18.75" height="3.5" />
</BoundingBox>
<Performance maxSpeed="70" maxDeceleration="10" maxAcceleration="10" />
<Performance maxSpeed="30" maxDeceleration="6" maxAcceleration="4" />
<Axles>
<FrontAxle maxSteering="0.5" wheelDiameter="0.8" trackWidth="1.68" positionX="2.98" positionZ="0.4" />
<RearAxle maxSteering="0" wheelDiameter="0.8" trackWidth="1.68" positionX="0" positionZ="0.4" />
<FrontAxle maxSteering="0.5" wheelDiameter="1.05" trackWidth="2.2" positionX="14.0" positionZ="0.525" />
<RearAxle maxSteering="0" wheelDiameter="1.05" trackWidth="2.2" positionX="0" positionZ="0.525" />
</Axles>
</Vehicle>
<Vehicle name="van" vehicleCategory="truck">
Expand Down Expand Up @@ -159,13 +159,13 @@
<Property name="SteeringRatio" value="15.0" />
</Properties>
<BoundingBox>
<Center x="1.3" y="0.0" z="0.8" />
<Dimensions width="1.8" length="4.5" height="1.5" />
<Center x="4.0" y="0.0" z="1.75" />
<Dimensions width="2.5" length="13.5" height="3.5" />
</BoundingBox>
<Performance maxSpeed="70" maxDeceleration="10" maxAcceleration="10" />
<Performance maxSpeed="30" maxDeceleration="6" maxAcceleration="4" />
<Axles>
<FrontAxle maxSteering="0.5" wheelDiameter="0.8" trackWidth="1.68" positionX="2.98" positionZ="0.4" />
<RearAxle maxSteering="0" wheelDiameter="0.8" trackWidth="1.68" positionX="0" positionZ="0.4" />
<FrontAxle maxSteering="0.5" wheelDiameter="1.05" trackWidth="2.2" positionX="8.0" positionZ="0.525" />
<RearAxle maxSteering="0" wheelDiameter="1.05" trackWidth="2.2" positionX="0" positionZ="0.525" />
</Axles>
</Vehicle>
<Vehicle name="motorbike" vehicleCategory="motorbike">
Expand Down Expand Up @@ -199,4 +199,4 @@
</Axles>
</Vehicle>
</Catalog>
</OpenSCENARIO>
</OpenSCENARIO>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _Note:_ Currently only esmini supports the OpenSCENARIO 1.1 format. For openPASS
_Note:_ The execution with openPASS expects xsltproc on the system path. Check out the "Notes regarding openPASS" for more information.

1. Clone or download this repository to your local drive.
2. a) Download the [latest esmini release](https://github.com/esmini/esmini/releases) (e.g. esmini-bin_win_x64.zip) (tested successfully with [esmini 2.8.2](https://github.com/esmini/esmini/releases/tag/v2.8.2)),
2. a) Download the [latest esmini release](https://github.com/esmini/esmini/releases) (e.g. esmini-bin_win_x64.zip) (tested successfully with [esmini 2.12.0](https://github.com/esmini/esmini/releases/tag/v2.12.0)),
or
b) Download the [latest openPASS release](https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass) (tested successfully with [openPASS v0.7](https://gitlab.eclipse.org/eclipse/simopenpass/simopenpass/-/tree/openPASS_0.7))
3. a) Create an environment variable "ESMINI", which directs to the "bin" folder of esmini. E.g. "C:\MyFolder\esmini\bin\",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@
</LanePosition>
</Position>
</Vertex>
<Vertex time="${2 * $TargetBlocking_InitPosition_LateralOffset_m / ($TargetBlocking_Speed_kph / 3.6)}">
<Vertex time="${2 * sqrt( $TargetBlocking_InitPosition_LateralOffset_m * $TargetBlocking_InitPosition_LateralOffset_m ) / ($TargetBlocking_Speed_kph / 3.6)}">
<!--Using sqrt(x*x) as replacement for abs()-->
<Position>
<LanePosition roadId="0" laneId="$Ego_InitPosition_LaneId" offset="${-$TargetBlocking_InitPosition_LateralOffset_m}" s="$TargetBlocking_InitPosition_LongitudinalOffset_m">
<Orientation h="$TargetBlocking_InitPosition_Heading_rad" />
Expand Down Expand Up @@ -191,7 +192,8 @@
</TriggeringEntities>
<EntityCondition>
<!--The target should start walking at a point in time, so that the ego would hit the target with the center of it's front bumper, if it doesn't brake.-->
<TimeHeadwayCondition entityRef="TargetBlocking" value="${$TargetBlocking_InitPosition_LateralOffset_m / ($TargetBlocking_Speed_kph / 3.6)}" freespace="true" rule="lessThan" coordinateSystem="road" relativeDistanceType="longitudinal"></TimeHeadwayCondition>
<!--Using sqrt(x*x) as replacement for abs()-->
<TimeHeadwayCondition entityRef="TargetBlocking" value="${sqrt( $TargetBlocking_InitPosition_LateralOffset_m * $TargetBlocking_InitPosition_LateralOffset_m ) / ($TargetBlocking_Speed_kph / 3.6)}" freespace="true" rule="lessThan" coordinateSystem="road" relativeDistanceType="longitudinal" />
</EntityCondition>
</ByEntityCondition>
</Condition>
Expand All @@ -216,7 +218,7 @@
<Condition name="End" delay="0" conditionEdge="rising">
<ByValueCondition>
<!--The scenario ends 10 s after the ego would reach the target without braking.-->
<SimulationTimeCondition value="${($TargetBlocking_InitPosition_LongitudinalOffset_m / $Ego_InitSpeed_Ve0_kph) + 10.0}" rule="greaterOrEqual" />
<SimulationTimeCondition value="${($TargetBlocking_InitPosition_LongitudinalOffset_m / ($Ego_InitSpeed_Ve0_kph / 3.6)) + 10.0}" rule="greaterOrEqual" />
</ByValueCondition>
</Condition>
</ConditionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<ValueConstraint rule="greaterThan" value="0.0"></ValueConstraint>
</ConstraintGroup>
</ParameterDeclaration>
<ParameterDeclaration name="$LeadVehicle_Init_LateralOffset_m" parameterType="double" value="0.0">
<ParameterDeclaration name="LeadVehicle_Init_LateralOffset_m" parameterType="double" value="0.0">
<ConstraintGroup>
<ValueConstraint rule="greaterThan" value="-1.75" />
<ValueConstraint rule="lessOrEqual" value="1.75" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<ValueConstraint rule="lessThan" value="10.0"></ValueConstraint>
</ConstraintGroup>
</ParameterDeclaration>
<ParameterDeclaration name="$LeadVehicle_Init_LateralOffset_m" parameterType="double" value="0.0">
<ParameterDeclaration name="LeadVehicle_Init_LateralOffset_m" parameterType="double" value="0.0">
<ConstraintGroup>
<ValueConstraint rule="greaterThan" value="-1.75" />
<ValueConstraint rule="lessOrEqual" value="1.75" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<SpeedAction>
<SpeedActionDynamics dynamicsShape="step" dynamicsDimension="time" value="0" />
<SpeedActionTarget>
<RelativeTargetSpeed entityRef="Ego" value="${$CutInVehicle_RelativeInitSpeed_Ve0_Vo0 / 3.6}" speedTargetValueType="delta" continuous="false" />
<RelativeTargetSpeed entityRef="Ego" value="${$CutInVehicle_RelativeInitSpeed_Ve0_Vo0_kph / 3.6}" speedTargetValueType="delta" continuous="false" />
</SpeedActionTarget>
</SpeedAction>
</LongitudinalAction>
Expand Down

0 comments on commit d6d91ea

Please sign in to comment.