-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parametric entity references (#25)
Signed-off-by: romanodanilo <[email protected]> Signed-off-by: romanodanilo <[email protected]>
- Loading branch information
1 parent
5999161
commit 3aa8e4d
Showing
4 changed files
with
2,666 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<OpenSCENARIO xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Schema/OpenSCENARIO.xsd"> | ||
<FileHeader revMajor="1" revMinor="3" date="2020-02-21T10:00:00" description="Cut-In example" author="ASAM e.V." /> | ||
<ParameterDeclarations> | ||
<ParameterDeclaration parameterType="string" name="owner" value="A2"/> | ||
</ParameterDeclarations> | ||
<CatalogLocations /> | ||
<RoadNetwork> | ||
<LogicFile filepath="Databases/AB_RQ31_Straight.xodr" /> | ||
</RoadNetwork> | ||
<Entities> | ||
<ScenarioObject name="Ego"> | ||
<Vehicle name="HAF" vehicleCategory="car"> | ||
<ParameterDeclarations /> | ||
<Performance maxSpeed="69.444" maxAcceleration="200" maxDeceleration="10.0" /> | ||
<BoundingBox> | ||
<Center x="1.5" y="0.0" z="0.9" /> | ||
<Dimensions width="2.1" length="4.5" height="1.8" /> | ||
</BoundingBox> | ||
<Axles> | ||
<FrontAxle maxSteering="0.5" wheelDiameter="0.6" trackWidth="1.8" positionX="3.1" positionZ="0.3" /> | ||
<RearAxle maxSteering="0.0" wheelDiameter="0.6" trackWidth="1.8" positionX="0.0" positionZ="0.3" /> | ||
</Axles> | ||
</Vehicle> | ||
</ScenarioObject> | ||
<ScenarioObject name="A1"> | ||
<Vehicle name="Default_Car" vehicleCategory="car"> | ||
<ParameterDeclarations /> | ||
<Performance maxSpeed="69.444" maxAcceleration="200" maxDeceleration="10.0" /> | ||
<BoundingBox> | ||
<Center x="1.4" y="0.0" z="0.8" /> | ||
<Dimensions width="2.0" length="4.2" height="1.6" /> | ||
</BoundingBox> | ||
<Axles> | ||
<FrontAxle maxSteering="0.5" wheelDiameter="0.5" trackWidth="1.75" positionX="2.8" positionZ="0.25" /> | ||
<RearAxle maxSteering="0.0" wheelDiameter="0.5" trackWidth="1.75" positionX="0.0" positionZ="0.25" /> | ||
</Axles> | ||
</Vehicle> | ||
</ScenarioObject> | ||
<ScenarioObject name="A2"> | ||
<Vehicle name="Default_Car" vehicleCategory="car"> | ||
<ParameterDeclarations /> | ||
<Performance maxSpeed="69.444" maxAcceleration="200" maxDeceleration="10.0" /> | ||
<BoundingBox> | ||
<Center x="1.4" y="0.0" z="0.8" /> | ||
<Dimensions width="2.0" length="4.2" height="1.6" /> | ||
</BoundingBox> | ||
<Axles> | ||
<FrontAxle maxSteering="0.5" wheelDiameter="0.5" trackWidth="1.75" positionX="2.8" positionZ="0.25" /> | ||
<RearAxle maxSteering="0.0" wheelDiameter="0.5" trackWidth="1.75" positionX="0.0" positionZ="0.25" /> | ||
</Axles> | ||
</Vehicle> | ||
</ScenarioObject> | ||
</Entities> | ||
<Storyboard> | ||
<Init> | ||
<Actions> | ||
<GlobalAction> | ||
<EnvironmentAction> | ||
<Environment name="Environment1"> | ||
<TimeOfDay animation="false" dateTime="2020-02-21T12:00:00" /> | ||
<Weather fractionalCloudCover="zeroOktas"> | ||
<Sun illuminance="100000.0" azimuth="0.0" elevation="1.571" /> | ||
<Fog visualRange="100000.0" /> | ||
<Precipitation precipitationType="dry" precipitationIntensity="0.0" /> | ||
</Weather> | ||
<RoadCondition frictionScaleFactor="1.0" /> | ||
</Environment> | ||
</EnvironmentAction> | ||
</GlobalAction> | ||
<Private entityRef="Ego"> | ||
<PrivateAction> | ||
<LongitudinalAction> | ||
<SpeedAction> | ||
<SpeedActionDynamics dynamicsShape="step" value="0" dynamicsDimension="time" /> | ||
<SpeedActionTarget> | ||
<AbsoluteTargetSpeed value="27.778" /> | ||
</SpeedActionTarget> | ||
</SpeedAction> | ||
</LongitudinalAction> | ||
</PrivateAction> | ||
<PrivateAction> | ||
<TeleportAction> | ||
<Position> | ||
<LanePosition roadId="1" laneId="-3" offset="0.5" s="1000.0" /> | ||
</Position> | ||
</TeleportAction> | ||
</PrivateAction> | ||
</Private> | ||
<Private entityRef="A1"> | ||
<PrivateAction> | ||
<LongitudinalAction> | ||
<SpeedAction> | ||
<SpeedActionDynamics dynamicsShape="step" value="0" dynamicsDimension="time" /> | ||
<SpeedActionTarget> | ||
<AbsoluteTargetSpeed value="27.778" /> | ||
</SpeedActionTarget> | ||
</SpeedAction> | ||
</LongitudinalAction> | ||
</PrivateAction> | ||
<PrivateAction> | ||
<TeleportAction> | ||
<Position> | ||
<RelativeLanePosition entityRef="Ego" dLane="0" ds="84.0" /> | ||
</Position> | ||
</TeleportAction> | ||
</PrivateAction> | ||
</Private> | ||
<Private entityRef="A2"> | ||
<PrivateAction> | ||
<LongitudinalAction> | ||
<SpeedAction> | ||
<SpeedActionDynamics dynamicsShape="step" value="0" dynamicsDimension="time" /> | ||
<SpeedActionTarget> | ||
<AbsoluteTargetSpeed value="30.556" /> | ||
</SpeedActionTarget> | ||
</SpeedAction> | ||
</LongitudinalAction> | ||
</PrivateAction> | ||
<PrivateAction> | ||
<TeleportAction> | ||
<Position> | ||
<RelativeLanePosition entityRef="Ego" dLane="1" ds="-100.0" /> | ||
</Position> | ||
</TeleportAction> | ||
</PrivateAction> | ||
</Private> | ||
</Actions> | ||
</Init> | ||
<Story name="MyStory"> | ||
<ParameterDeclarations> | ||
<ParameterDeclaration parameterType="string" name="owner" value="A2" /> | ||
</ParameterDeclarations> | ||
<Act name="Act1"> | ||
<ManeuverGroup maximumExecutionCount="1" name="Sequence1"> | ||
<Actors selectTriggeringEntities="false"> | ||
<EntityRef entityRef="$owner" /> | ||
</Actors> | ||
<Maneuver name="Maneuver1"> | ||
<Event name="Event1" priority="override"> | ||
<Action name="Action1"> | ||
<PrivateAction> | ||
<LateralAction> | ||
<LaneChangeAction targetLaneOffset="-0.0361164093018"> | ||
<LaneChangeActionDynamics dynamicsDimension="distance" dynamicsShape="cubic" value="54.8254917969"/> | ||
<LaneChangeTarget> | ||
<RelativeTargetLane entityRef="Ego" value="0"/> | ||
</LaneChangeTarget> | ||
</LaneChangeAction> | ||
</LateralAction> | ||
</PrivateAction> | ||
</Action> | ||
<StartTrigger> | ||
<ConditionGroup> | ||
<Condition name="StartCondition1" delay="0" conditionEdge="rising"> | ||
<ByEntityCondition> | ||
<TriggeringEntities triggeringEntitiesRule="any"> | ||
<EntityRef entityRef="$owner" /> | ||
</TriggeringEntities> | ||
<EntityCondition> | ||
<DistanceCondition value="20.0" freespace="false" coordinateSystem="road" rule="greaterThan"> | ||
<Position> | ||
<RelativeObjectPosition entityRef="Ego" dx="0" dy="0" /> | ||
</Position> | ||
</DistanceCondition> | ||
</EntityCondition> | ||
</ByEntityCondition> | ||
</Condition> | ||
</ConditionGroup> | ||
</StartTrigger> | ||
</Event> | ||
</Maneuver> | ||
</ManeuverGroup> | ||
</Act> | ||
</Story> | ||
<StopTrigger> | ||
<ConditionGroup> | ||
<Condition name="End_of_simulation" delay="10.0" conditionEdge="none"> | ||
<ByValueCondition> | ||
<StoryboardElementStateCondition storyboardElementType="act" storyboardElementRef="Act1" state="completeState" /> | ||
</ByValueCondition> | ||
</Condition> | ||
</ConditionGroup> | ||
</StopTrigger> | ||
</Storyboard> | ||
</OpenSCENARIO> |
Oops, something went wrong.